Skip to content

Data Structures

Catalogue of core structures with quick practice links.


Linear Structures

Structure Description Links
Arrays Prefix/suffix math, in-place transforms, iteration patterns Practice · Notes
Linked Lists Pointer manipulation, cycle detection, reversal Practice · Notes
Stacks LIFO operations, parentheses matching, undo/redo Practice · Notes
Queues FIFO operations, BFS traversal, scheduling Practice · Notes

Associative Structures

Structure Description Links
Hash Tables Constant-time lookups for counting/deduping Practice · Notes
Hash Sets Unique element storage, membership checks Practice · Notes

Hierarchical Structures

Structure Description Links
Binary Trees Traversals (pre/in/post/level), depth, balance Practice · Notes
Binary Search Trees Ordered insertion, search, validation Practice · Notes
Heaps / Priority Queues Surface extremes fast for scheduling/top-k Practice · Notes
Tries (Prefix Trees) Prefix lookups for autocomplete/dictionaries Practice · Notes

Graph Structures

Structure Description Links
Adjacency List Space-efficient sparse graphs, traversal Practice · Notes
Adjacency Matrix Dense graphs, quick edge lookups Practice · Notes

Specialized Structures

Structure Description Links
Probabilistic Bloom Filters, HyperLogLog, Count-Min Sketch Notes
Spatial Quadtrees, K-D Trees, R-Trees, Geohashing Notes
Advanced Trees Segment Trees, Fenwick Trees, B-Trees, Red-Black Trees Notes

Complexity Reference

Structure Access Search Insert Delete Space
Array O(1) O(n) O(n) O(n) O(n)
Linked List O(n) O(n) O(1) O(1) O(n)
Hash Table O(1) O(1) O(1) O(n)
Binary Search Tree O(log n) O(log n) O(log n) O(n)
Heap O(n) O(log n) O(log n) O(n)
Trie O(m) O(m) O(m) O(n·m)

m = key length, n = number of elements