Differentiate betwe…
 
Notifications
Clear all

Differentiate between stack and queue data structure?

1 Posts
2 Users
0 Likes
347 Views
0
Topic starter

Differentiate between stack and queue data structure?

1 Answer
0

A stack follows a LIFO (Last In First Out) order, whereas a queue follows a FIFO (First In First Out) order for storing the elements. A stack uses one end known as a top for insertion and deletion whereas a queue uses two ends front and rear for insertion and deletion.

Share: