Introduction to Queues
A queue is an ordered data structure where items follow the first-in-first-out principle. (Reading time: under 1 minute)
You can think of a queue as a pipe, with both ends open. Objects enter from one and are removed from the other. This means that, unlike the stack that used the last-in-first-out principle, queues use the first-in-first-out principle.
Get hands-on with 1400+ tech skills courses.