Reference no: EM132242681
Question. Using C++, implement the following ADT Data Structures:
a. A stack using a singly-linked list with all the following functions: push, pop, top, isEmpty, getSize, displayStack
Provide test cases that shows the implementation of all the functions of the stack (push, pop, top, isEmpty, getSize, displayStack)
b. A queue using a doubly-linked list with these operations: enqueue, dequeue, getSize, isEmpty, displayQueue
Provide test cases that shows the implementation of all the functions of the queue (enqueue, dequeue, getSize, isEmpty, displayQueue)
Notes,
1) The stack should be implemented using a singly-linked list
2) The queue should be implemented using a doubly-linked list
3) Send code that runs in Microsoft visual studio.
4) Include steps for running code in Microsoft visual studio.