TAG
Algorithm
39 notes
- Data Structures and Algorithmshistorical
A practical framework for choosing data structures and algorithms by operations, constraints, complexity, and memory/locality.
- 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.
- Cache Replacement Policieshistorical
LRU, LFU, FIFO, random and modern approximate policies, with workload-dependent hit-rate trade-offs.
- Dynamic Programminghistorical
Solving overlapping subproblems with memoization/tabulation by defining state, transition, initialization, and answer.
- Greedy Algorithmshistorical
Making locally optimal choices only when the problem structure proves they compose into a global optimum.
- Divide and Conquerhistorical
Split a problem into smaller independent subproblems, solve them, then combine their results.
- Recursionhistorical
Recursive problem decomposition, base cases, call-stack cost, tail recursion caveats, and iterative alternatives.
- Backtrackinghistorical
Search a decision tree by choose–recurse–undo, with pruning and state management.
- Depth-First Searchhistorical
Recursive or explicit-stack DFS for graphs/trees, visitation state, cycle handling, and complexity.
- Binary Searchhistorical
Logarithmic search over a monotonic/sorted domain, including boundary variants.
- Heap Sorthistorical
In-place comparison sorting using heap construction followed by repeated root extraction.
- Insertion Sorthistorical
Stable in-place insertion into a sorted prefix, efficient for small or nearly sorted inputs.
- Quick Sorthistorical
Partition-based sorting with O(n log n) expected time, pivot selection, and worst-case safeguards.
- Selection Sorthistorical
Repeatedly selecting the minimum/maximum with quadratic comparisons and few swaps.
- Sorting Algorithms Overviewhistorical
Comparing sorting algorithms by time, space, stability, adaptiveness, locality, and data constraints.
- 4.1 Compare-and-Swap (CAS)historical
The basic CAS semantics, use cases, ABA problem, and CPU atomic-instruction implementation.
- 4.2 Lock-Free Queuehistorical
A historical CAS-based lock-free queue implementation note and its safe-memory-reclamation boundary.