Implementation

In this lesson, we'll implement a queue using an array.

We'll cover the following

Implementation

A queue can be implemented using an array or a doubly-linked list. They will have the same time complexity.

Array

The limitation in using an array is that the maximum size of the queue is limited.

Keep two pointers front and back.

Get hands-on with 1400+ tech skills courses.