Category: Blog
-

How to Learn Patience Sorting: Piles, Binary Search, Longest Increasing Subsequences and O(n log n) Reconstruction
Quick read: Patience sorting begins with a simple card-game rule: place each new value on the leftmost pile whose top is at least that value, or start a new pile if none exists. That tiny rule leads to an O(n log n) method for finding the length of a longest increasing subsequence and, with predecessor…
-

How to Learn the Dutch National Flag Algorithm: Three-Way Partitioning, Loop Invariants, Duplicate Keys and Production Quicksort
Quick read: The Dutch National Flag algorithm turns an array containing three classes of values into three contiguous regions in one linear scan and constant extra space. The important lesson is not the colours. It is the discipline of maintaining a loop invariant while several boundaries move at once. One-sentence answer: keep a left boundary…
-

How to Learn Dynamic Time Warping (DTW): Cost Matrices, Warping Paths, Step Constraints, Sakoe–Chiba Bands and Production Sequence Alignment
A beginner-to-professional guide to Dynamic Time Warping covering cost matrices, warping paths, step constraints, Sakoe–Chiba bands, memory, lower bounds, testing and production sequence alignment.
-

How to Learn the Two-Way String-Matching Algorithm: Critical Factorization, Periods, Maximal Suffixes, Constant Space and Linear-Time Search
A beginner-to-professional guide to the Crochemore–Perrin Two-Way string-matching algorithm covering critical factorization, periods, maximal suffixes, constant-space linear search and production edge cases.
-

How to Learn Elias–Fano Encoding: Monotone Integer Sequences, High/Low Bit Splitting, Unary Gaps, Select and Succinct Search
A beginner-to-professional guide to Elias–Fano encoding covering monotone sequences, high/low bit splitting, select-based reconstruction, succinct navigation, space bounds and production trade-offs.
-

How to Learn Tarjan’s Low-Link Algorithm: DFS Discovery Times, Bridges, Articulation Points and Biconnected Structure
A beginner-to-professional guide to Tarjan’s low-link algorithm for bridges, articulation points and biconnected structure, with proofs, edge cases, testing and implementation guidance.