Medium

Deque

A deque adds and removes at either end. Both ends stay O(1) with a linked block or a circular buffer.

Costs

CategoryData Structure
DifficultyMedium
Add or remove at the frontO(1)
Add or remove at the backO(1)
Random accessO(n)

Questions

What is Deque?

A deque adds and removes at either end. Both ends stay O(1) with a linked block or a circular buffer.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.