Notes

I've started to collect notes here that I find useful or interesting.

Arrays and Hashing

Data Structures and Algorithms

Hash tables for O(1) lookups; In-place array manipulation; Frequency counting

Sliding Window

Data Structures and Algorithms

Fixed vs variable size windows; Window state management; Window boundaries

Two Pointers

Data Structures and Algorithms

Start/end pointer movement; Fast/slow pointer technique; Meeting in middle

Binary Search

Data Structures and Algorithms

Binary search variations; Search space reduction; Boundary conditions

Linked Lists

Data Structures and Algorithms

Pointer manipulation; Multiple pointer traversal; Cycle detection

Stacks and Queues

Data Structures and Algorithms

LIFO/FIFO principles; Monotonic stack patterns; Nested structure validation

Trees

Data Structures and Algorithms

Tree traversal strategies; Recursion vs iteration; Path tracking

Tries

Data Structures and Algorithms

Prefix-based search; Character-by-character traversal; Word dictionary operations

Heaps and Priority Queues

Data Structures and Algorithms

Binary heap properties; K-way processing; Stream operations

Graphs

Data Structures and Algorithms

Graph traversal (BFS/DFS); Graph representation; Cycle detection

Backtracking

Data Structures and Algorithms

State space exploration; Constraint handling; Solution building

Dynamic Programming

Data Structures and Algorithms

State transition; Memoization vs tabulation; Optimal substructure

Greedy Algorithms

Data Structures and Algorithms

Local vs global optimization; Interval processing; Sorting-based greedy

Bit Manipulation

Data Structures and Algorithms

Bitwise operations; Bit flags; Bit counting techniques