In C++
Implement the removeAtPosition function of the LinkedListclass.
bool LinkedList::removeAtPosition(int position)
The job of this function is to remove the node at the givenposition.
If given a position in legal range, the function will remove thenode at that position, reduce the length by 1 and return true. Forexample, if the list is initially { 1, 2, 3 } and we callremoveAtPosition(2) then the list will be changed to { 1, 3 },length will be decreased from 3 to 2 and true will be returned.
If position is less than 1 or greater than length then thefunction should leave the list unchanged and return false.
Note
PayPal Gateway not configured
PayPal Gateway not configured