Question: Please answer in c++ not any other language! 1 Modify the Linkedlist class Both stacks and queues are able to remove items from their lists.

Please answer in c++ not any other language! Please answer in c++ not any other language! 1 Modify the Linkedlistclass Both stacks and queues are able to remove items from their

1 Modify the Linkedlist class Both stacks and queues are able to remove items from their lists. Therefore, this capability needs to be added to the LinkedList class we developed earlier Modify the LinkedList class from the previous assignment by adding two functions. Both of these functions will require us manipulate the relevant pointers correctly a)int deleteFromFront () This function will remove the first data item from the list (i.e, the one immediately after the head node) and return its value. Note that the node is actually removed. The list will thereafter have one fewer elements in it. Don't forget to deallocate (delete) the node after the value has been captured If the list is empty when this function is called, have it return a -1 as an error message b)int deleteFromEnd () This function will remove the last data item from the list (i.e, the one immediately before the tail node) and return its value. Note that the node is actually removed. The list will thereafter have one fewer elements in it. Don't forget to deallocate (delete) the node after the value has been captured. If the list is empty when this function is called, have it return a -1 as an error message 2) Create a Stack class Create a Stack class that inherits publicly from LinkedList and includes the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!