Uber interview question

Explain the difference between a Queue and a Stack?

Interview Answer

Anonymous

12 July 2018

A queue is a first-in, first-out data structure, whereas a Stack is a last-in, first-out data structure.