Solvarch
DSA ProblemsProgressPlanRoadmapsReviewCheat SheetsCompaniesSystem DesignCS FundamentalsQuestion Bank
Theme

Cheat Sheets

Topic-wise pattern references: recognition cues, the core template, key variations, and the pitfalls that cost interviews.

0/17 completed

Quick References

Big-O Complexity

Common complexities, data-structure operation costs, and how to read constraints to guess the intended solution.

3 min readcomplexity

Choosing a Pattern

A decision guide — map the phrases in a problem statement to the pattern that solves it.

2 min readpatterns

Pattern Library

Arrays & Hashing

Hash maps, sets, prefix sums, and frequency counting — the pattern behind a third of all easy/medium problems.

2 min readarrayshash-map

Two Pointers

Converging, parallel, and fast/slow pointers — O(n) scans that replace nested loops on sorted or structured data.

2 min readarrayspointers

Sliding Window

Fixed and variable windows over strings and arrays — longest/shortest substring problems in O(n).

2 min readstringsarrays

Binary Search

The bulletproof template, boundary (first/last) searches, rotated arrays, and binary search on the answer space.

2 min readbinary-search

Stacks & Monotonic Stack

Matching, simulation, expression evaluation, and the monotonic stack behind every "next greater" problem.

2 min readstacks

Linked Lists

Dummy heads, fast/slow pointers, reversal — the small toolkit that solves every list problem.

2 min readlinked-listpointers

Binary Trees & BSTs

DFS recursion shapes, BFS levels, BST invariants, and the global-variable trick for path problems.

2 min readtreesrecursion

Tries

Prefix trees for autocomplete, dictionaries, and wildcard search — when a hash set of words isn't enough.

2 min readtriesstrings

Heaps & Top-K

Size-k heaps, two-heap medians, and when bucket sort or quickselect beats the heap.

2 min readheapstop-k

Intervals

Sort-then-sweep — merging, inserting, and scheduling ranges without off-by-one wounds.

2 min readintervalssorting

Backtracking

The choose–explore–unchoose template for subsets, permutations, combinations, and constraint search.

2 min readbacktrackingrecursion

Graphs

BFS, DFS, topological sort, union-find, Dijkstra — and how to pick between them in ten seconds.

3 min readgraphsbfsdfs

Dynamic Programming

State, transition, base case — the five DP families and a recipe for deriving each from brute force.

3 min readdynamic-programming

Greedy

When the locally best choice is globally safe — recognizing greedy problems and defending the choice out loud.

2 min readgreedy

Bit Manipulation

The XOR family, bit tricks worth memorizing, and adding without the plus sign.

2 min readbits