Search
Lessons (8)
- Recursion & Backtracking
… each call handles a smaller version until the base case](/img/dsa/recursion-dolls.svg) Every recursive function …
- Dynamic Programming
… memoisation"] direction TB t1["Start from the big problem"] -- t2["Recurse into smaller ones"] -- t3["Cache every answer …
- Graphs: BFS & DFS
… DFS uses a stack , usually the call stack via recursion. js function dfs(graph, node, visited = new Set …
- Big-O Notation Made Simple
… A recursion 10,000 levels deep uses O(10,000) stack space and may crash with "Maximum call …
- Trees & Binary Search Trees
… folders, DOM, org charts, JSON. - Most tree problems are recursion: solve left, solve right, combine. - Four traversals: pre …
- Stacks & Queues
… b["b()"] --- a["a()"] --- g["global"] end Infinite recursion keeps pushing frames until: "RangeError: Maximum call stack size …
- DSA Interview Patterns Cheat Sheet
… 3 Stacks, queues, linked lists 4 Trees, BST, recursion 5 Graphs: BFS, DFS, topological sort 6 Heaps, binary …
- Sorting Algorithms
… stand right." Then each group does the same, recursively. mermaid flowchart TD A["[7, 2, 9, 4, 5 …