Draw the (1)stack and (2)circular queue data structures in array implementation for "each step" in the following sequence :add(A),add(B), add(C), remove, add(D), add(E), remove, add (F), add(G). Assume the initial size of 5 for array implementation. Remember to show TOP(top of the stack) for stack and both Front and back for queue. In circular queue implementation assume we sacrifice one storage for telling the difference between FULL and EMPTY.
Stack
(2) Circular queue
Comments
Leave a comment