Question: please complete the Linked List data structure in C++ You are to write three separate programs, one each for stacks, queues, and linked-lists that support

please complete the Linked List data structure in C++ You are toplease complete the Linked List data structure in C++

You are to write three separate programs, one each for stacks, queues, and linked-lists that support the following operations for each data structure in question. Each of your program should include a class definition for "Node" (or chunk), a class definition for the data structure (stack/queue/LL) as well as a main function that should give a "menu" like interface to call the various functions. This "menu" like interface can be easily acheived with a "while(1)" loop and a "switch" statement nested within it, like we did in the last lecture. You can use the stack code we did in class as a reference to finish the rest Functions required for each data structure: 1. Linked list: insertAtHead(int value) Hint: Similar to Stacks, insert at position 1 insertAtPosition(int position, int value) Hint: This should insert a node with value' at any position in the list as long as that position is valid removeFromPosition(int position) Hint: Similar to insert above, this should remove a node from a list as long as position is valid displayContents0)

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!