2.Data Structures
Data Structures & Algorithms · 20 notes
- Arrayhistorical
Contiguous indexed storage, constant-time random access, resizing, insertion/deletion costs, and cache locality.
- Hash Table / Hash Maphistorical
Hashing, buckets, collisions, load factor, resizing, and expected versus worst-case lookup complexity.
- Linked Listhistorical
Singly/doubly linked lists, insertion/deletion, traversal, pointer techniques, and locality trade-offs.
- Queuehistorical
FIFO queues, dequeues, circular buffers, bounded queues, and priority-queue distinctions.
- Sethistorical
Uniqueness collections implemented with hashing, balanced trees, bitmaps, or specialized structures.
- Stackhistorical
LIFO storage, push/pop/peek operations, recursion, parsing, monotonic stacks, and implementation choices.
- Tree Data Structureshistorical
Rooted trees, binary trees, BSTs, balanced trees, traversals, heaps, tries, and B-tree families.
- Red-Black Treehistorical
A self-balancing binary search tree with color invariants that keep height logarithmic.
- Skip Listhistorical
Probabilistic ordered structure with multiple forward-pointer levels and expected logarithmic search/update.
- Heap / Priority Queuehistorical
Binary heap representation and priority-queue operations such as push, peek, pop, and heapify.
- Bloom Filterhistorical
Probabilistic membership testing with no false negatives for inserted items and tunable false positives.
- Graphhistorical
Graph modeling, adjacency lists/matrices, directed/undirected and weighted graphs, and common traversals/problems.
- Union-Find (Disjoint Set)historical
Disjoint-set union with find/union, path compression, and union by rank/size.
- LSM Treehistorical
Log-structured merge-tree write path, sorted runs, compaction, read/write amplification, and storage-engine trade-offs.
- Ziplist (Historical Redis Structure)historical
Historical compact sequential Redis encoding and the general memory-versus-update-cost trade-off of packed representations.
- B-Treehistorical
Multiway balanced search trees optimized for block/page-oriented storage and their relationship to B+ trees.
- Sparse Indexhistorical
Indexing selected block/range boundary keys to reduce index size while requiring local scans within the selected region.
- Index Data Structureshistorical
Why indexes trade extra storage/write work for faster lookup, range, search, or aggregation paths.