liveBook · Manning

Deque

Also called double-ended queue

A deque is a double-ended queue data structure that supports insertion and removal at both its front and back.

How 3 Manning books explain it

Fabulous Adventures in Data Structures and Algorithms

A mutable double-ended queue is a double-ended queue whose contents can be changed by operations at either end.

How it is used
Supports access at both ends while motivating an efficient immutable, persistent sequence.
How deep it goes
Develops the C# interface, a failed naïve representation, recursive chunked operations, complexity, generic types, and concatenation.
Examples
Uses a character deque to trace edge overflows and an undo–redo queue to contrast mutable use.
What you can do after
Build it from scratch as a persistent C# deque with cheap end operations and recursive concatenation.

Read how Fabulous Adventures in Data Structures and Algorithms explains deque →

Refactoring to Rust

A double-ended queue is a sequence data structure that supports insertion and removal at both its front and back.

How it is used
Implements a stack for evaluating reverse Polish notation expressions.
How deep it goes
Defines front and back operations, contrasts VecDeque with Vec, and demonstrates a stack wrapper without exploring internal storage mechanics.
Examples
Demonstrates RpnStack with arithmetic expressions including `3 4 +`, multiplication, division, and empty-stack failure.
What you can do after
Build it from scratch as a Rust wrapper that pushes and pops values at one deque end.

Read how Refactoring to Rust explains deque →

Python Concurrency with asyncio

A deque is a double-ended queue that supports insertion and removal at both ends.

How it is used
Uses bounded deques to manage terminal messages, scrolling output while preserving the input field.
How deep it goes
Explains bounded storage, append behavior, input buffering, and redraw callbacks, but does not discuss implementation internals.
Examples
Uses a scrolling message display, a character input buffer, a MessageStore, and an asynchronous delay console.
What you can do after
Apply it via Python's collections.deque to build bounded message stores and scrolling console output.

Read how Python Concurrency with asyncio explains deque →

Also covered in

What to know first

Related concepts

Questions about deque

What is deque?

A deque is a double-ended queue data structure that supports insertion and removal at both its front and back.

Which Manning books explain deque?

Fabulous Adventures in Data Structures and Algorithms, Refactoring to Rust and Python Concurrency with asyncio.

What should I know before learning deque?

Manning books that teach deque usually introduce option, priority queue, result type and stack first.

What is deque a kind of?

Deque is a kind of sequence. A sequence is an ordered collection of elements whose positions determine the order in which they are arranged or traversed.

What are the parts of deque?

Deque includes deque of minis.

What is deque also called?

Deque is also called double-ended queue.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.