Namaste DSA — Complete Tutorial Index

Namaste DSA — Complete Tutorial Index

Hey everyone! Welcome to Namaste DSA! 🙏

This is the complete chapter-by-chapter index for the entire Data Structures & Algorithms series. Everything you need — from "what even is Big-O?" to cracking the hardest Dynamic Programming problems — is here in plain, simple language. Bookmark this page and use it as your roadmap!

No fancy math degree needed. Every chapter follows the same shape: understand the idea → see it as a picture → trace it by hand → write the code → know the complexity → answer the interview question.

┌─────────────────────────────────────────────────────────────────┐
│                    NAMASTE DSA — ROADMAP                         │
├─────────────────────────────────────────────────────────────────┤
│                                                                   │
│  SEASON 1 — FOUNDATIONS          (Chapters 01 – 05)              │
│  SEASON 2 — LINEAR DS & PATTERNS (Chapters 06 – 10)              │
│  SEASON 3 — SEARCHING & SORTING  (Chapters 11 – 13)              │
│  SEASON 4 — NON-LINEAR DS        (Chapters 14 – 18)              │
│  SEASON 5 — ADVANCED ALGORITHMS  (Chapters 19 – 24)              │
│  DEEP DIVES — PATTERNS & PROOFS  (Bonus episodes)                │
│                                                                   │
└─────────────────────────────────────────────────────────────────┘

Legend: ✅ = ready to read · ⏳ = coming soon


SEASON 1 — Foundations

"You can't run before you can walk. Master these first."

Ch.TitleWhat You'll LearnKey ConceptStatus
01 Big-O & Complexity Analysis Why we measure code with Big-O (not seconds!) · All complexities: O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ), O(n!) · How to read Big-O from code (loop rules) · Dropping constants & lower-order terms — and WHY · Best vs Average vs Worst case · Time complexity vs Space complexity · The Big-O cheat sheet (must memorize for interviews) Big-O describes how your code GROWS as the input grows. ✅ Done
02 Arrays: The Foundation How arrays are stored in memory (contiguous blocks) · Why index access is O(1) — the address formula · Insert / delete / search — the real cost of each · Static vs Dynamic arrays (how JS arrays grow) · Prefix sum — turning O(n) queries into O(1) · Kadane's Algorithm (max subarray) An array is just a row of boxes with numbered addresses. ✅ Done
03 Strings Strings are arrays of characters (immutable in JS!) · Why string concatenation in a loop is O(n²) · Character codes, ASCII, charCodeAt · Reversing, palindromes, anagrams · Frequency counting with a 26-size array · Substring vs subsequence (huge difference!) A string is an array of characters you usually can't change in place. ✅ Done
04 Hashing: Maps & Sets What a hash function does (key → bucket) · Why Map/Set give O(1) average lookup · Collisions and how they're handled · JS Map vs Object vs Set — when to use which · The "seen before?" pattern (Two Sum!) · Frequency maps & grouping (group anagrams) Hashing trades memory for speed — instant lookups instead of scanning. ✅ Done
05 Recursion & the Call Stack Base case + recursive case — the two rules · The call stack — drawn step by step · Recursion tree — visualizing the calls · Factorial, Fibonacci, sum of array · Why naive Fibonacci is O(2ⁿ) · Recursion vs iteration & the hidden stack-space cost Recursion = a function that solves a smaller version of the same problem. ✅ Done

SEASON 2 — Linear Data Structures & Patterns

"This is where interview patterns begin."

Ch.TitleWhat You'll LearnKey ConceptStatus
06 Two Pointers The two-pointer idea (opposite ends & same direction) · Pair-sum in a sorted array · Reversing & removing duplicates in place (O(1) space) · Fast & slow pointers (cycle detection) · When two pointers beats a nested loop Two pointers turns many O(n²) brute forces into O(n). ✅ Done
07 Sliding Window Fixed-size window (max sum of k elements) · Variable-size window (longest substring problems) · Expand & shrink the window · When to use a window vs two pointers Instead of recomputing each window, slide it and reuse work. ✅ Done
08 Linked Lists Node = value + pointer to next · Singly vs Doubly vs Circular · Why insert/delete is O(1) but access is O(n) · Reversing a linked list (the #1 interview question) · Finding the middle & detecting a cycle (Floyd's) · Merging two sorted lists A linked list is a chain of nodes — each one points to the next. ✅ Done
09 Stacks LIFO — Last In, First Out · push / pop / peek — all O(1) · Valid parentheses problem · Next greater element (monotonic stack) · How the call stack IS a stack A stack is a pile of plates — you take from the top. ✅ Done
10 Queues & Deques FIFO — First In, First Out · Why a naive array queue is slow (and the fix) · Circular queue & Deque (double-ended) · Queue as the engine of BFS · Sliding window maximum (monotonic deque) A queue is a line at a ticket counter — first come, first served. ✅ Done

SEASON 3 — Searching & Sorting

"Half the interview problems are 'sort it, then...' "

Ch.TitleWhat You'll LearnKey ConceptStatus
11 Binary Search (& Search on Answer) Why binary search is O(log n) · The exact template (no more off-by-one bugs) · First/last occurrence & search in rotated array · "Binary search on the answer" — the advanced pattern · Lower bound / upper bound Halve the search space every step → log n steps total. ✅ Done
12 Sorting Algorithms Bubble, Selection, Insertion — the simple O(n²) trio · Merge Sort — divide & conquer, O(n log n), stable · Quick Sort — partitioning, average O(n log n) · Why O(n log n) is the sorting speed limit · Counting Sort & stable vs unstable sorting Good sorts split the work in half — that's where log n comes from. ✅ Done
13 Searching Patterns Linear search and when it's actually fine · Sorting first to unlock binary search · Hashing vs sorting vs searching — picking the tool · Two-pointer search on sorted data (3-Sum) The data structure you pick decides how fast you can search. ✅ Done

SEASON 4 — Non-Linear Data Structures

"Trees and graphs scare people. They won't scare you."

Ch.TitleWhat You'll LearnKey ConceptStatus
14 Trees & Binary Trees Tree vocabulary: root, leaf, height, depth · Traversals: Inorder, Preorder, Postorder (with pictures) · Level-order traversal (BFS on a tree) · Recursive vs iterative traversal · Height, diameter, and counting nodes A tree is a structure that branches — like a family tree. ✅ Done
15 Binary Search Trees (BST) The BST rule: left < node < right · Search / insert / delete in O(log n) · Why inorder traversal gives a sorted list · When a BST degrades to O(n) (and balancing) · Validating a BST A BST keeps data sorted so you can search by halving. ✅ Done
16 Heaps & Priority Queues Min-heap vs Max-heap · How a heap lives inside an array · Heapify, push, pop — all O(log n) · "Top K elements" — the classic heap pattern · Heap Sort A heap always keeps the smallest (or largest) at the top. ✅ Done
17 Tries (Prefix Trees) How a trie stores words letter by letter · Insert and search in O(word length) · Prefix search (autocomplete!) · When a trie beats a hash map A trie shares common prefixes — perfect for word lookups. ✅ Done
18 Graphs: BFS & DFS Adjacency list vs adjacency matrix · BFS — explore level by level (uses a queue) · DFS — go deep first (uses recursion/stack) · Visited set — avoiding infinite loops · Connected components, shortest path, cycle detection A graph is dots (nodes) connected by lines (edges). ✅ Done

SEASON 5 — Advanced Algorithms

"The final boss. Learn to think, not memorize."

Ch.TitleWhat You'll LearnKey ConceptStatus
19 Backtracking Choose → Explore → Un-choose · The backtracking template · Subsets, permutations, combinations · N-Queens intuition · Pruning — cutting off dead branches Backtracking tries every option, undoing each before trying the next. ✅ Done
20 Greedy Algorithms Making the locally best choice · When greedy works (and when it fails!) · Activity selection, coin change (greedy version) · Greedy vs DP — the key difference Greedy grabs the best-looking option right now and never looks back. ✅ Done
21 Dynamic Programming (1D) Overlapping subproblems + optimal substructure · Memoization (top-down) vs Tabulation (bottom-up) · Fibonacci done right — O(2ⁿ) → O(n) · Climbing stairs, house robber · How to FIND the recurrence DP = recursion + remembering answers you already computed. ✅ Done
22 Dynamic Programming (2D & Advanced) Grid DP (unique paths, min path sum) · Knapsack pattern · Longest Common Subsequence · Edit distance · Building the DP table by hand 2D DP fills a table where each cell builds on earlier cells. ✅ Done
23 Bit Manipulation Binary number basics · AND, OR, XOR, NOT, shifts · XOR tricks (find the single number) · Checking/setting/clearing a bit · Counting set bits (Brian Kernighan) Bits let you do math the CPU's native way — blazing fast. ✅ Done
24 Math for DSA GCD / LCM (Euclid's algorithm) · Prime checking & Sieve of Eratosthenes · Modular arithmetic basics · Fast exponentiation · Combinatorics basics A little math unlocks a lot of "impossible" problems. ⏳ Coming soon

DEEP DIVES — Patterns & Proofs

"For those who want to think like the interviewer, not just pass."
Ep.TitleWhat You'll LearnKey ConceptStatus
Deep Dive 01 How to Recognize the Pattern A decision tree: problem clues → which technique · "Sorted array?" → two pointers / binary search · "Substring/subarray?" → sliding window · "All combinations?" → backtracking · "Optimal + overlapping?" → DP · Reading constraints for hidden hints 80% of problems are 8 patterns wearing different clothes. ✅ Done
Deep Dive 02 Complexity Proofs & Amortized Analysis Proving why merge sort is O(n log n) · The Master Theorem (made simple) · Amortized analysis (why dynamic array push is O(1)) · Space complexity of recursion (the hidden stack) Understanding WHY a complexity holds makes you unshakeable. ⏳ Coming soon
Bonus Top Interview Problems (Pattern-Wise) Arrays & Hashing (Two Sum, Best Time to Buy Stock...) · Two Pointers & Sliding Window · Stacks, Queues & Linked Lists · Trees & Graphs (BFS/DFS) · Binary Search, Backtracking, Dynamic Programming · The "must-do" practice order + final interview tips ⏳ Coming soon

Topic Map — What Lives Where

TopicChapter / EpisodeStatus
Big-O, time & space complexityChapter 01✅ Done
Arrays, prefix sum, Kadane'sChapter 02✅ Done
Strings, palindromes, anagramsChapter 03✅ Done
Hashing, Maps, Sets, Two SumChapter 04✅ Done
Recursion, call stack, recursion treeChapter 05✅ Done
Two pointers, fast & slowChapter 06✅ Done
Sliding windowChapter 07✅ Done
Linked lists, reverse, cycle detectionChapter 08✅ Done
Stacks, monotonic stackChapter 09✅ Done
Queues, deques, BFS engineChapter 10✅ Done
Binary search, search on answerChapter 11✅ Done
Sorting (merge, quick, counting)Chapter 12✅ Done
Searching patternsChapter 13✅ Done
Trees, traversals (in/pre/post/level)Chapter 14✅ Done
BST, validate, insert/deleteChapter 15✅ Done
Heaps, priority queue, top KChapter 16✅ Done
Tries, prefix searchChapter 17✅ Done
Graphs, BFS, DFS, componentsChapter 18✅ Done
Backtracking, subsets, N-QueensChapter 19✅ Done
Greedy algorithmsChapter 20✅ Done
Dynamic Programming (1D)Chapter 21✅ Done
Dynamic Programming (2D)Chapter 22✅ Done
Bit manipulation, XOR tricksChapter 23✅ Done
Math (GCD, primes, sieve)Chapter 24⏳ Coming soon
Pattern recognitionDeep Dive 01✅ Done
Complexity proofs, Master TheoremDeep Dive 02⏳ Coming soon
Top interview problemsBonus⏳ Coming soon

How to Use This Series

1. Complete beginner?
   Start at Chapter 01 and go in order — don't skip, every chapter
   builds on the previous. Trace every example BY HAND on paper
   before reading the code, and re-draw the ASCII diagrams yourself.

2. Know the basics (loops, functions, arrays)?
   Skim Chapter 01 (just the cheat sheet), then start seriously at
   Chapter 04 (Hashing) and Season 2 — that's what interviews
   actually test.

3. Preparing for interviews?
   Read Deep Dive 01 (pattern recognition) FIRST for the vocabulary.
   Then drill the patterns: Two Pointers, Sliding Window, BFS/DFS, DP.
   Finish with the Top Interview Problems list. Always say your
   complexity OUT LOUD — interviewers expect it.

4. Want to understand DSA deeply?
   Chapter 01 → all of Season 1, then season by season, doing
   problems after each chapter. Deep Dives 01 & 02 last, once you
   have the muscle memory.

Chapters 01 – 23 + Deep Dive 01 are live now. Chapter 24, Deep Dive 02 and the Bonus problem set are on the way!

Keep coding, keep grinding! See you in the chapters!