Skip to content
UPEEC

More Data Structures

Lists, hashing, balanced trees, string structures and range-query structures. Arrays, linked lists, stacks, queues, hash tables, binary trees, BSTs and heaps have their own pages earlier in this subject.

Intermediate
Comments 0

This is an overview — pick a sub-topic below.

Sub-topics (21)

Strings as a Data Structure

Sequences of characters — arrays with special operations (search, compare, substring).

Beginner♥ 0🔖 0💬 0

Deques

Double-ended queues: insert and remove at both ends in $O(1)$.

Easy♥ 0🔖 0💬 0

Hash Maps

Key → value storage with average $O(1)$ lookup using a hash function.

Easy♥ 0🔖 0💬 0

Sets

Collections of unique elements with fast membership tests.

Beginner♥ 0🔖 0💬 0

AVL Trees

Self-balancing BSTs where subtree heights differ by at most 1, restored by rotations.

Advanced♥ 0🔖 0💬 0

Red-Black Trees

Self-balancing BSTs with node colours and rules ensuring height ≤ $2\log_2(n+1)$.

Advanced♥ 0🔖 0💬 0

B-Trees

Balanced trees with many keys per node, designed for disks and databases.

Advanced♥ 0🔖 0💬 0

B+ Trees

B-trees that store all values in linked leaves, with internal nodes only for routing.

Advanced♥ 0🔖 0💬 0

Tries

Prefix trees storing strings character by character.

Intermediate♥ 0🔖 0💬 0

Suffix Trees

A compressed trie of all suffixes of a string.

Expert♥ 0🔖 0💬 0

Suffix Arrays

All suffixes of a string sorted, stored as starting indices — a compact alternative to suffix trees.

Expert♥ 0🔖 0💬 0

Segment Trees

A tree over an array that answers range queries (sum, min, max) and point updates in $O(\log n)$.

Advanced♥ 0🔖 0💬 0

Fenwick Trees

Binary Indexed Trees: prefix sums with point updates in $O(\log n)$ using low-bit tricks.

Advanced♥ 0🔖 0💬 0

Sparse Tables

Precomputed answers for power-of-two ranges giving $O(1)$ range-minimum queries on static arrays.

Advanced♥ 0🔖 0💬 0

Disjoint-Set Union

Union-Find: track which elements are in the same group, with near-$O(1)$ union and find.

Intermediate♥ 0🔖 0💬 0

Graph Representations

Adjacency matrix ($O(V^2)$ space, $O(1)$ edge check) vs adjacency list ($O(V+E)$ space, fast neighbour iteration).

Easy♥ 0🔖 0💬 0

Bloom Filters

A compact probabilistic set: "definitely not present" or "probably present".

Advanced♥ 0🔖 0💬 0

LRU Cache

A fixed-size cache that evicts the Least Recently Used item.

Intermediate♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.