Question d’entretien chez Catchpoint

What is the difference between stack and queue? What is a circular linked list?

Réponse à la question d'entretien

Utilisateur anonyme

16 avr. 2015

What is the difference between stack and queue? Stack is a DS where you put everything on top of it, and in order to access an element on the bottom , you need to pop everything else. Queue is a DS where every element is pushed at the end and the firs element ever pushed is always on the top. Dequeue will remove the first element on the top, aka the first element queued into the DS. Thus the difference is in how elements are stored. What is a circular linked list? Linked list is circular when a tail is connected to a head.

1