Question: what is difference between stack and queue in data structure?
Answer: A stack is an ordered list of elements where all insertions and deletions are made at the same end, whereas a queue is exactly the opposite of a stack which is open at both the ends meaning one end is used to insert data while the other to remove data. ... stack is known as lifo and queue is kniwn as fifo rule .