Assume we have a linked list class with a single reference t

Assume we have a linked list class with a single reference to the first item in the list and an integer keeping the count.

Write the RemoveBack() method for the Linked List. Try to build it yourself without referring to the Remove slides (they will be remarkably similar).

Be sure to account for a list with 1 item and an empty list.

Solution

Boolean RemoveBack(Node *Head){

if (Head->next->next)

return false

else

return true

Assume we have a linked list class with a single reference to the first item in the list and an integer keeping the count. Write the RemoveBack() method for the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site