Glossary
Auto-generated index of key terms and which lesson covers them.
| Term | Lesson |
|---|---|
| @cache vs Tabulation — When to Use Which | 16. Dynamic Programming |
| @dataclass(order=True) (Cleanest) | 11. Heaps and Priority Queues |
| 2D Grid DP | 16. Dynamic Programming |
| 3Sum — Fix One, Two-Pointer the Rest | 03. Two Pointers and Sliding Window |
| Alternative: Nested Dict (No Class) | 12. Tries |
| Amortized Complexity | 01. How to Think About Complexity |
| Backtracking Template | 07. Recursion |
| Backtracking vs DP | 13. Backtracking |
| Balanced vs Unbalanced | 10. Trees and BSTs |
| Bellman-Ford Algorithm | 15. Shortest Path and MST |
| Best, Worst, Average | 01. How to Think About Complexity |
| Beyond Quadratic | 01. How to Think About Complexity |
| BFS — Breadth-First Search | 14. Graphs |
| Binary Search Trees | 10. Trees and BSTs |
| Bit Manipulation | 17. Greedy and Bit Manipulation |
| Bitmask as Set | 17. Greedy and Bit Manipulation |
| BST Deletion | 10. Trees and BSTs |
| BST Validation | 10. Trees and BSTs |
| Class with lt (Alternative) | 11. Heaps and Priority Queues |
| Classic Example: Climbing Stairs | 16. Dynamic Programming |
| Classic Example: Coin Change | 16. Dynamic Programming |
| collections.deque — O(1) on Both Ends | 02. Lists Strings and Arrays |
| Combinations (Choose K from N) | 13. Backtracking |
| Common Bit Tricks | 17. Greedy and Bit Manipulation |
| Common Bugs | 09. Binary Search |
| Common DP Categories | 16. Dynamic Programming |
| Complexity | 14. Graphs |
| Connected Components | 14. Graphs |
| Contiguous Memory | 02. Lists Strings and Arrays |
| Counter — Purpose-Built Frequency Map | 04. Hash Maps and Sets |
| Counting Sort — O(n + k) | 08. Sorting Algorithms |
| Custom Comparators with functools.cmp_to_key | 08. Sorting Algorithms |
| defaultdict — No KeyError | 04. Hash Maps and Sets |
| Delete Operation | 12. Tries |
| Deque — Double-Ended Queue | 05. Stacks and Queues |
| DFS — Depth-First Search | 14. Graphs |
| DFS Patterns on Trees | 10. Trees and BSTs |
| dict vs defaultdict vs Counter | 04. Hash Maps and Sets |
| Dijkstra Variants | 15. Shortest Path and MST |
| Dijkstra's Algorithm | 15. Shortest Path and MST |
| DP vs Greedy | 16. Dynamic Programming |
| Essential Operations | 17. Greedy and Bit Manipulation |
| Frequency Counting | 02. Lists Strings and Arrays |
| frozenset — Hashable Sets | 04. Hash Maps and Sets |
| Greedy vs DP — How to Decide | 17. Greedy and Bit Manipulation |
| Grid as Graph | 14. Graphs |
| How Hash Maps Work | 04. Hash Maps and Sets |
| How to Analyze Code | 01. How to Think About Complexity |
| How to Recognize DP | 16. Dynamic Programming |
| Implementation with TrieNode | 12. Tries |
| Implementing Sorts From Scratch | 08. Sorting Algorithms |
| Iterative DFS | 10. Trees and BSTs |
| K stops limit (modified Bellman-Ford) | 15. Shortest Path and MST |
| Kadane's Algorithm | 03. Two Pointers and Sliding Window |
| Knapsack: 0/1 vs Unbounded | 16. Dynamic Programming |
| LeetCode 1 - Two Sum | 04. Hash Maps and Sets |
| LeetCode 104 - Maximum Depth of Binary Tree | 07. Recursion |
| LeetCode 11 - Container With Most Water | 03. Two Pointers and Sliding Window |
| LeetCode 1143 - Longest Common Subsequence | 16. Dynamic Programming |
| LeetCode 125 - Valid Palindrome | 03. Two Pointers and Sliding Window |
| LeetCode 128 - Longest Consecutive Sequence | 04. Hash Maps and Sets |
| LeetCode 136 - Single Number | 17. Greedy and Bit Manipulation |
| LeetCode 141 - Linked List Cycle | 03. Two Pointers and Sliding Window, 06. Linked Lists |
| LeetCode 15 - 3Sum | 03. Two Pointers and Sliding Window |
| LeetCode 152 - Maximum Product Subarray | 03. Two Pointers and Sliding Window |
| LeetCode 179 - Largest Number | 08. Sorting Algorithms |
| LeetCode 20 - Valid Parentheses | 05. Stacks and Queues |
| LeetCode 200 - Number of Islands | 14. Graphs |
| LeetCode 206 - Reverse Linked List | 06. Linked Lists |
| LeetCode 206 - Reverse Linked List (Recursive) | 07. Recursion |
| LeetCode 208 - Implement Trie (Prefix Tree) | 12. Tries |
| LeetCode 209 - Minimum Size Subarray Sum | 03. Two Pointers and Sliding Window |
| LeetCode 21 - Merge Two Sorted Lists | 06. Linked Lists |
| LeetCode 21 - Merge Two Sorted Lists (Recursive) | 07. Recursion |
| LeetCode 210 - Course Schedule II | 14. Graphs |
| LeetCode 212 - Word Search II | 12. Tries |
| LeetCode 22 - Generate Parentheses | 07. Recursion |
| LeetCode 23 - Merge K Sorted Lists | 11. Heaps and Priority Queues |
| LeetCode 239 - Sliding Window Maximum | 05. Stacks and Queues |
| LeetCode 242 - Valid Anagram | 02. Lists Strings and Arrays, 04. Hash Maps and Sets |
| LeetCode 26 - Remove Duplicates from Sorted Array | 02. Lists Strings and Arrays, 03. Two Pointers and Sliding Window |
| LeetCode 283 - Move Zeroes | 02. Lists Strings and Arrays, 03. Two Pointers and Sliding Window |
| LeetCode 295 - Find Median from Data Stream | 11. Heaps and Priority Queues |
| LeetCode 3 - Longest Substring Without Repeating Characters | 03. Two Pointers and Sliding Window |
| LeetCode 303 - Range Sum Query Immutable | 02. Lists Strings and Arrays |
| LeetCode 322 - Coin Change | 16. Dynamic Programming |
| LeetCode 33 - Search in Rotated Sorted Array | 09. Binary Search |
| LeetCode 347 - Top K Frequent Elements | 04. Hash Maps and Sets, 11. Heaps and Priority Queues |
| LeetCode 39 - Combination Sum | 13. Backtracking |
| LeetCode 416 - Partition Equal Subset Sum | 16. Dynamic Programming |
| LeetCode 435 - Non-overlapping Intervals | 17. Greedy and Bit Manipulation |
| LeetCode 450 - Delete Node in a BST | 10. Trees and BSTs |
| LeetCode 46 - Permutations | 13. Backtracking |
| LeetCode 49 - Group Anagrams | 04. Hash Maps and Sets |
| LeetCode 51 - N-Queens | 13. Backtracking |
| LeetCode 53 - Maximum Subarray | 03. Two Pointers and Sliding Window |
| LeetCode 547 - Number of Provinces | 15. Shortest Path and MST |
| LeetCode 55 - Jump Game | 17. Greedy and Bit Manipulation |
| LeetCode 56 - Merge Intervals | 08. Sorting Algorithms, 17. Greedy and Bit Manipulation |
| LeetCode 560 - Subarray Sum Equals K | 04. Hash Maps and Sets |
| LeetCode 62 - Unique Paths | 16. Dynamic Programming |
| LeetCode 70 - Climbing Stairs | 16. Dynamic Programming |
| LeetCode 72 - Edit Distance | 16. Dynamic Programming |
| LeetCode 739 - Daily Temperatures | 05. Stacks and Queues |
| LeetCode 743 - Network Delay Time | 15. Shortest Path and MST |
| LeetCode 76 - Minimum Window Substring | 03. Two Pointers and Sliding Window |
| LeetCode 77 - Combinations | 13. Backtracking |
| LeetCode 78 - Subsets | 13. Backtracking |
| LeetCode 787 - Cheapest Flights Within K Stops | 15. Shortest Path and MST |
| LeetCode 875 - Koko Eating Bananas | 09. Binary Search |
| LeetCode 88 - Merge Sorted Array | 02. Lists Strings and Arrays |
| LeetCode 98 - Validate Binary Search Tree | 10. Trees and BSTs |
| LeetCode 994 - Rotting Oranges | 14. Graphs |
| Left and Right Boundaries | 09. Binary Search |
| Level-Order (BFS) with collections.deque | 10. Trees and BSTs |
| List Construction Patterns | 02. Lists Strings and Arrays |
| Lowest Common Ancestor (LCA) | 10. Trees and BSTs |
| Memoization vs Tabulation | 16. Dynamic Programming |
| Memoization with functools.cache | 07. Recursion |
| Merge Sort | 08. Sorting Algorithms |
| Minimum Spanning Tree | 15. Shortest Path and MST |
| Monotonic Stack | 05. Stacks and Queues |
| Multi-Source BFS | 14. Graphs |
| Multiple Recursive Calls | 07. Recursion |
| N-Queens (Classic Backtracking) | 13. Backtracking |
| nlargest and nsmallest | 11. Heaps and Priority Queues |
| Partition: The Key Insight | 08. Sorting Algorithms |
| Pattern: Autocomplete | 12. Tries |
| Pattern: Deduplication / Seen Set | 04. Hash Maps and Sets |
| Pattern: Dummy Head | 06. Linked Lists |
| Pattern: Fast and Slow Pointers | 06. Linked Lists |
| Pattern: Frequency Counting | 04. Hash Maps and Sets |
| Pattern: Frequency Counting with Counter | 02. Lists Strings and Arrays |
| Pattern: Grouping | 04. Hash Maps and Sets |
| Pattern: Interval Scheduling | 17. Greedy and Bit Manipulation |
| Pattern: Jump Game | 17. Greedy and Bit Manipulation |
| Pattern: Merge Intervals | 17. Greedy and Bit Manipulation |
| Pattern: Merge K Sorted Lists | 11. Heaps and Priority Queues |
| Pattern: Prefix Sum | 02. Lists Strings and Arrays |
| Pattern: Prefix Sum + Hash Map | 04. Hash Maps and Sets |
| Pattern: Read/Write Pointer | 02. Lists Strings and Arrays |
| Pattern: Reverse a Linked List | 06. Linked Lists |
| Pattern: Rotate Array | 02. Lists Strings and Arrays |
| Pattern: Running Median (Two Heaps) | 11. Heaps and Priority Queues |
| Pattern: Top-K Elements | 11. Heaps and Priority Queues |
| Pattern: Two Pointers with Gap | 06. Linked Lists |
| Pattern: Two Sum (Complement Lookup) | 04. Hash Maps and Sets |
| Pattern: Word Search II (Trie + Backtracking) | 12. Tries |
| Permutations (All Orderings) | 13. Backtracking |
| Prim's Algorithm | 15. Shortest Path and MST |
| Pruning | 13. Backtracking |
| Python Lists Are Dynamic Arrays | 02. Lists Strings and Arrays |
| Python OOP Basics for Interviews | 06. Linked Lists |
| Python-Specific Costs You Must Know | 01. How to Think About Complexity |
| Python-Specific Tips | 03. Two Pointers and Sliding Window |
| Python's Built-in Sorting | 08. Sorting Algorithms |
| Python's dict | 04. Hash Maps and Sets |
| Python's heapq Module | 11. Heaps and Priority Queues |
| Python's queue Module | 05. Stacks and Queues |
| Python's Recursion Limit | 07. Recursion |
| Queues — First In, First Out | 05. Stacks and Queues |
| Quicksort | 08. Sorting Algorithms |
| Recursion on Linked Lists | 07. Recursion |
| Recursion on Trees | 07. Recursion |
| Recursion vs Iteration | 07. Recursion |
| Representation | 14. Graphs |
| Rotated Sorted Array | 09. Binary Search |
| Search on Answer (Binary Search on Result) | 09. Binary Search |
| Set Construction from Iterables | 04. Hash Maps and Sets |
| Set Operations | 04. Hash Maps and Sets |
| Sets | 04. Hash Maps and Sets |
| Shortest path to a specific target | 15. Shortest Path and MST |
| Simple Sorts (O(n²)) | 08. Sorting Algorithms |
| Slicing | 02. Lists Strings and Arrays |
| Sliding Window: Fixed Size | 03. Two Pointers and Sliding Window |
| Sliding Window: Variable Size | 03. Two Pointers and Sliding Window |
| Sorting as a Preprocessing Step | 08. Sorting Algorithms |
| Sorting with key= | 08. Sorting Algorithms |
| Stacks — Last In, First Out | 05. Stacks and Queues |
| State Design | 16. Dynamic Programming |
| String DP: Edit Distance | 16. Dynamic Programming |
| String DP: Longest Common Subsequence | 16. Dynamic Programming |
| Strings in Python | 02. Lists Strings and Arrays |
| Subsets (All Combinations) | 13. Backtracking |
| The Basic Template | 09. Binary Search |
| The bisect Module | 09. Binary Search |
| The Call Stack | 07. Recursion |
| The DP Framework | 16. Dynamic Programming |
| The Five Common Classes | 01. How to Think About Complexity |
| The Max-Heap Trick: Negate Values | 11. Heaps and Priority Queues |
| The Practical Rule | 01. How to Think About Complexity |
| The Recursive Leap of Faith | 07. Recursion |
| The Two Parts | 07. Recursion |
| Time Complexity | 13. Backtracking |
| Time vs Space | 01. How to Think About Complexity |
| Topological Sort | 14. Graphs |
| Traversal | 06. Linked Lists |
| Traversals | 10. Trees and BSTs |
| Trie vs Dict vs BST | 12. Tries |
| Tuple Priority | 11. Heaps and Priority Queues |
| Two Pointers: Fast and Slow (Floyd's) | 03. Two Pointers and Sliding Window |
| Two Pointers: Opposite Direction | 03. Two Pointers and Sliding Window |
| Two Pointers: Same Direction (Read/Write) | 03. Two Pointers and Sliding Window |
| Unicode in Python | 02. Lists Strings and Arrays |
| Union-Find | 15. Shortest Path and MST |
| Using bisect for exact search | 09. Binary Search |
| What About Actual Arrays? | 02. Lists Strings and Arrays |
| What Can Be a Key? | 04. Hash Maps and Sets |
| When Binary Search Applies | 09. Binary Search |
| When DFS vs BFS | 14. Graphs |
| When Greedy Works | 17. Greedy and Bit Manipulation |
| When NOT to Use Hash Maps | 04. Hash Maps and Sets |
| When NOT to Use Heaps | 11. Heaps and Priority Queues |
| When NOT to Use Linked Lists | 06. Linked Lists |
| When NOT to Use Lists | 02. Lists Strings and Arrays |
| When NOT to Use Trees | 10. Trees and BSTs |
| When NOT to Use Tries | 12. Tries |
| When to Use Bit Manipulation | 17. Greedy and Bit Manipulation |
| When to Use Dijkstra vs BFS vs Bellman-Ford | 15. Shortest Path and MST |
| When to Use Hash Maps | 04. Hash Maps and Sets |
| When to Use Heaps | 11. Heaps and Priority Queues |
| When to Use Linked Lists | 06. Linked Lists |
| When to Use Lists | 02. Lists Strings and Arrays |
| When to Use Stack vs Queue | 05. Stacks and Queues |
| When to Use Trees | 10. Trees and BSTs |
| When to Use Tries | 12. Tries |
| When to Use Two Pointers vs Sliding Window | 03. Two Pointers and Sliding Window |
| Where Queues Appear | 05. Stacks and Queues |
| Where Stacks Appear | 05. Stacks and Queues |
| Wildcard Matching | 12. Tries |
| XOR Properties | 17. Greedy and Bit Manipulation |