Skip to main content

7 docs tagged with "patterns"

View all tags

Hashing Patterns

Prefix-sum hashing and complement hashing — two of the highest-leverage patterns in algorithmic problem solving.

Heaps & Priority Queues

Binary heaps from first principles to production — top-K, streaming medians, and scheduler design.

Sliding Window

Fixed and variable-size windows for subarray/substring problems, explained at conceptual and implementation levels.

Stacks & Queues

LIFO/FIFO structures plus the monotonic stack/queue pattern for interview and production use.

Two Pointers

From converging pointers to Floyd's cycle detection — turning O(n²) scans into O(n) passes.