Stack and Queue

Illustrate the difference between the stack and Queue in brief?

E

Expert

Verified

Stack:

a) It represents the collection of elements in the Last In First Out order.

b) The operations comprises testing null stack, finding out the top element in the stack, elimination of top most element and adding up elements on the top of stack.

Queue:

a) It represents the collection of elements in First In First Out order.

b) The operations comprise testing null queue, finding out the next element, elimination of elements and inserting the elements from the queue.

c) Insertion of elements is at the end of queue

d) Deletion of elements is from the starting of queue.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.