Pregunta de entrevista de Revature

What is the difference between a queue and a stack?

Respuesta de la entrevista

Anónimo

10 de dic de 2020

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 .

1