Skip to main content

18 docs tagged with "data-structures"

View all tags

Arrays & Dynamic Arrays

An array is a block of contiguous memory holding equally-sized elements. That one property gives it

Balanced Trees

A binary search tree is $O(\log n)$ only while it stays short, and nothing in the plain

Graphs

A graph is a set of vertices and a set of edges connecting them. That is nearly no structure

Hash Tables

A hash table turns a key into an array index by running it through a hash function, then reads or

Linked Lists

A linked list stores each element in its own node, together with a pointer to the next one. Nothing

LRU & LFU Caches

A cache with unlimited capacity is just a hash table. The interesting problem

Stacks & Queues

Stacks and queues are not new storage — they are restrictions on storage. Both hold a sequence,

STL Containers

Containers store collections of objects. The STL provides optimized, well-tested containers for different access patterns and performance needs. Choose the right container for your use case.

Tries (Prefix Trees)

A hash set answers "is this exact string in the set?" and nothing else. It cannot answer "what strings