employer cover photo
employer logo
employer logo

Tata Consultancy Services

Fait partie de Tata Group

Employeur impliqué

Question d’entretien chez Tata Consultancy Services

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

Réponse à la question d'entretien

Utilisateur anonyme

20 mars 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).