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. We learn every topic the same way: understand the idea → see it as a picture → trace it by hand → write the code → know the complexity → answer the interview question.
The series is divided into 5 Seasons + Deep Dive episodes:
┌─────────────────────────────────────────────────────────────────┐ │ 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) │ │ │ └─────────────────────────────────────────────────────────────────┘
HOW EVERY TOPIC IS TAUGHT:
──────────────────────────
Idea in plain words → ASCII picture → Dry run by hand
→ JavaScript code → Time/Space table → Interview Q&A
SEASON 1 — Foundations
"You can't run before you can walk. Master these first."
✅ Chapter 01 — Big-O & Complexity Analysis → Read Chapter
What you'll learn: ────────────────── ✔ 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) Key Concept: Big-O describes how your code GROWS as the input grows.
✅ Chapter 02 — Arrays: The Foundation → Read Chapter
What you'll learn: ────────────────── ✔ 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) Key Concept: An array is just a row of boxes with numbered addresses.
✅ Chapter 03 — Strings → Read Chapter
What you'll learn: ────────────────── ✔ 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!) Key Concept: A string is an array of characters you usually can't change in place.
✅ Chapter 04 — Hashing: Maps & Sets → Read Chapter
What you'll learn: ────────────────── ✔ 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) Key Concept: Hashing trades memory for speed — instant lookups instead of scanning.
✅ Chapter 05 — Recursion & the Call Stack → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: Recursion = a function that solves a smaller version of the same problem.
SEASON 2 — Linear Data Structures & Patterns
"This is where interview patterns begin."
✅ Chapter 06 — Two Pointers → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: Two pointers turns many O(n²) brute forces into O(n).
✅ Chapter 07 — Sliding Window → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: Instead of recomputing each window, slide it and reuse work.
✅ Chapter 08 — Linked Lists → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A linked list is a chain of nodes — each one points to the next.
✅ Chapter 09 — Stacks → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A stack is a pile of plates — you take from the top.
✅ Chapter 10 — Queues & Deques → Read Chapter
What you'll learn: ────────────────── ✔ 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) Key Concept: A queue is a line at a ticket counter — first come, first served.
SEASON 3 — Searching & Sorting
"Half the interview problems are 'sort it, then...' "
✅ Chapter 11 — Binary Search (& Search on Answer) → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: Halve the search space every step → log n steps total.
✅ Chapter 12 — Sorting Algorithms → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: Good sorts split the work in half — that's where log n comes from.
✅ Chapter 13 — Searching Patterns → Read Chapter
What you'll learn: ────────────────── ✔ 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) Key Concept: The data structure you pick decides how fast you can search.
SEASON 4 — Non-Linear Data Structures
"Trees and graphs scare people. They won't scare you."
✅ Chapter 14 — Trees & Binary Trees → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A tree is a structure that branches — like a family tree.
✅ Chapter 15 — Binary Search Trees (BST) → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A BST keeps data sorted so you can search by halving.
✅ Chapter 16 — Heaps & Priority Queues → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A heap always keeps the smallest (or largest) at the top.
✅ Chapter 17 — Tries (Prefix Trees) → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A trie shares common prefixes — perfect for word lookups.
✅ Chapter 18 — Graphs: BFS & DFS → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: A graph is dots (nodes) connected by lines (edges).
SEASON 5 — Advanced Algorithms
"The final boss. Learn to think, not memorize."
✅ Chapter 19 — Backtracking → Read Chapter
What you'll learn: ────────────────── ✔ Choose → Explore → Un-choose ✔ The backtracking template ✔ Subsets, permutations, combinations ✔ N-Queens intuition ✔ Pruning — cutting off dead branches Key Concept: Backtracking tries every option, undoing each before trying the next.
✅ Chapter 20 — Greedy Algorithms → Read Chapter
What you'll learn: ────────────────── ✔ Making the locally best choice ✔ When greedy works (and when it fails!) ✔ Activity selection, coin change (greedy version) ✔ Greedy vs DP — the key difference Key Concept: Greedy grabs the best-looking option right now and never looks back.
✅ Chapter 21 — Dynamic Programming (1D) → Read Chapter
What you'll learn: ────────────────── ✔ 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 Key Concept: DP = recursion + remembering answers you already computed.
✅ Chapter 22 — Dynamic Programming (2D & Advanced) → Read Chapter
What you'll learn: ────────────────── ✔ Grid DP (unique paths, min path sum) ✔ Knapsack pattern ✔ Longest Common Subsequence ✔ Edit distance ✔ Building the DP table by hand Key Concept: 2D DP fills a table where each cell builds on earlier cells.
✅ Chapter 23 — Bit Manipulation → Read Chapter
What you'll learn: ────────────────── ✔ Binary number basics ✔ AND, OR, XOR, NOT, shifts ✔ XOR tricks (find the single number) ✔ Checking/setting/clearing a bit ✔ Counting set bits (Brian Kernighan) Key Concept: Bits let you do math the CPU's native way — blazing fast.
⏳ Chapter 24 — Math for DSA (coming soon)
What you'll learn: ────────────────── ✔ GCD / LCM (Euclid's algorithm) ✔ Prime checking & Sieve of Eratosthenes ✔ Modular arithmetic basics ✔ Fast exponentiation ✔ Combinatorics basics Key Concept: A little math unlocks a lot of "impossible" problems.
DEEP DIVES — Patterns & Proofs
"For those who want to think like the interviewer, not just pass."
✅ Deep Dive 01 — How to Recognize the Pattern → Read Deep Dive
What you'll learn: ────────────────── ✔ 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 Key Concept: 80% of problems are 8 patterns wearing different clothes.
⏳ Deep Dive 02 — Complexity Proofs & Amortized Analysis (coming soon)
What you'll learn: ────────────────── ✔ 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) Key Concept: Understanding WHY a complexity holds makes you unshakeable.
⏳ Bonus — Top Interview Problems (Pattern-Wise) (coming soon)
Topics covered: ────────────────── ✔ 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
Topic Map — What Lives Where
| Topic | Chapter / Episode | Status |
|---|---|---|
| Big-O, time & space complexity | Chapter 01 | ✅ Done |
| Arrays, prefix sum, Kadane's | Chapter 02 | ✅ Done |
| Strings, palindromes, anagrams | Chapter 03 | ✅ Done |
| Hashing, Maps, Sets, Two Sum | Chapter 04 | ✅ Done |
| Recursion, call stack, recursion tree | Chapter 05 | ✅ Done |
| Two pointers, fast & slow | Chapter 06 | ✅ Done |
| Sliding window | Chapter 07 | ✅ Done |
| Linked lists, reverse, cycle detection | Chapter 08 | ✅ Done |
| Stacks, monotonic stack | Chapter 09 | ✅ Done |
| Queues, deques, BFS engine | Chapter 10 | ✅ Done |
| Binary search, search on answer | Chapter 11 | ✅ Done |
| Sorting (merge, quick, counting) | Chapter 12 | ✅ Done |
| Searching patterns | Chapter 13 | ✅ Done |
| Trees, traversals (in/pre/post/level) | Chapter 14 | ✅ Done |
| BST, validate, insert/delete | Chapter 15 | ✅ Done |
| Heaps, priority queue, top K | Chapter 16 | ✅ Done |
| Tries, prefix search | Chapter 17 | ✅ Done |
| Graphs, BFS, DFS, components | Chapter 18 | ✅ Done |
| Backtracking, subsets, N-Queens | Chapter 19 | ✅ Done |
| Greedy algorithms | Chapter 20 | ✅ Done |
| Dynamic Programming (1D) | Chapter 21 | ✅ Done |
| Dynamic Programming (2D) | Chapter 22 | ✅ Done |
| Bit manipulation, XOR tricks | Chapter 23 | ✅ Done |
| Math (GCD, primes, sieve) | Chapter 24 | ⏳ Coming soon |
| Pattern recognition | Deep Dive 01 | ✅ Done |
| Complexity proofs, Master Theorem | Deep Dive 02 | ⏳ Coming soon |
| Top interview problems | Bonus | ⏳ Coming soon |
How to Use This Series
If you are a 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 → Re-draw the ASCII diagrams yourself If you KNOW the basics (loops, functions, arrays): → Skim Chapter 01 (just the cheat sheet) → Start seriously at Chapter 04 (Hashing) and Season 2 (patterns) → These patterns are what interviews actually test If you are 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 If you want to understand DSA DEEPLY: → Chapter 01 → all of Season 1 → Then go 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!