Data Structures & Algorithms
Markdown-first mind map for pattern recognition, fast recall, and interview teaching: coding patterns, ~200+ problem write-ups, cheatsheets, and system design (under DSA as extended interview prep).
How to use this mind map
Start here: recognition flow, layout, and conventions.
Patterns
~20 pattern cards (two pointers, DP, graphs, …).
Topics
Problems grouped by topic; one file per question.
Problem index
Master curated list with canonical paths.
Pattern recognition
Decision tree and triage cues.
Similar problems map
Cross-links between related problems.
Roadmap
Phased study plan.
Interview prep
Plans, behavioral (STAR), company notes.
System design (bundle)
Fundamentals → building blocks → HLD/LLD → deep dives.
Problem template
Shape every problem write-up follows.
Maintenance
Sync, validation, and visual enrichment workflows.
Quick orientation
DSA interviews reward structured thinking: name the pattern, state complexity, then refine. Use the sidebar: Patterns for recognition, Topics for deep problem pages, Cheatsheets for short recall, System design when the loop expands beyond LeetCode-style coding.
Understand concepts (not just solutions)
Each pattern is a reusable invariant: a rule that stays true while the algorithm moves. To learn clearly:
- Name the object — array index, window boundaries, stack top, tree node return value, heap ordering, etc.
- State the invariant — what is always true about “done” vs “unknown” work after each step?
- Prove the move — why is the next step safe? Which candidates can never be the answer after this move?
- Connect to complexity — each step should throw away a constant fraction of work (log), or touch each item a bounded number of times (linear).
If a problem page feels dense, read the matching pattern card first (same idea, less detail), then return to the problem’s diagram and “Understanding” sections.
Tiny vocabulary (shared across topics)
- Asymptotic complexity — how work grows with input size; ignore constants but keep
nvslog nvsn log nstraight. - Amortized — some steps are expensive, but averaged over many operations the cost is still low (typical for hash tables and dynamic arrays).
- Greedy vs optimal — greedy picks the locally best move; it is only correct when an exchange argument or problem structure proves local choices cannot block the global optimum.
- State (DP / recursion) — the minimum summary of past decisions you need to continue; if you can describe it in a tuple, you can often tabulate it.
Mark this page when you finish learning it.
Last updated on
Spotted something unclear or wrong on this page?