employer cover photo
employer logo
employer logo

Tata Consultancy Services

Gehört zu Tata Group

Ist dies Ihr Unternehmen?

Frage im Vorstellungsgespräch bei Tata Consultancy Services

Can you explain the difference between a stack and a queue?

Antwort im Vorstellungsgespräch

Anonym

20. März 2025

A stack follows the LIFO (Last In, First Out) principle, where the last element added is the first to be removed (e.g., a stack of plates). A queue follows the FIFO (First In, First Out) principle, where the first element added is the first to be removed (e.g., a line of people at a ticket counter).