| 1 |
LeetCode 1: Two Sum — Python Solution |
Easy |
Hashmap | complement lookup |
| 2 |
LeetCode 2: Add Two Numbers — Python Solution |
Medium |
Linked List | digitwise carry |
| 3 |
LeetCode 3: Longest Substring Without Repeating Characters — Python Solution |
Medium |
Sliding Window | last-seen sliding window |
| 6 |
LeetCode 6: Zigzag Conversion — Python Solution |
Medium |
Array / String | row simulation |
| 11 |
LeetCode 11: Container With Most Water — Python Solution |
Medium |
Two Pointers | greedy boundary movement |
| 12 |
LeetCode 12: Integer to Roman — Python Solution |
Medium |
Array / String | greedy token emission |
| 13 |
LeetCode 13: Roman to Integer — Python Solution |
Easy |
Array / String | look-ahead parsing |
| 14 |
LeetCode 14: Longest Common Prefix — Python Solution |
Easy |
Array / String | vertical character scan |
| 15 |
LeetCode 15: 3Sum — Python Solution |
Medium |
Two Pointers | sort plus two pointers |
| 19 |
LeetCode 19: Remove Nth Node From End of List — Python Solution |
Medium |
Linked List | fixed-gap pointers |
| 20 |
LeetCode 20: Valid Parentheses — Python Solution |
Easy |
Stack | expected-closer stack |
| 21 |
LeetCode 21: Merge Two Sorted Lists — Python Solution |
Easy |
Linked List | dummy-tail merge |
| 25 |
LeetCode 25: Reverse Nodes in k-Group — Python Solution |
Hard |
Linked List | group boundary reversal |
| 26 |
LeetCode 26: Remove Duplicates from Sorted Array — Python Solution |
Easy |
Array / String | sorted write pointer |
| 27 |
LeetCode 27: Remove Element — Python Solution |
Easy |
Array / String | write pointer |
| 28 |
LeetCode 28: Find the Index of the First Occurrence in a String — Python Solution |
Easy |
Array / String | substring scan |
| 30 |
LeetCode 30: Substring with Concatenation of All Words — Python Solution |
Hard |
Sliding Window | word-aligned windows |
| 36 |
LeetCode 36: Valid Sudoku — Python Solution |
Medium |
Matrix | row-column-box sets |
| 42 |
LeetCode 42: Trapping Rain Water — Python Solution |
Hard |
Array / String | two pointers with bounded sides |
| 45 |
LeetCode 45: Jump Game II — Python Solution |
Medium |
Array / String | greedy BFS frontier |
| 48 |
LeetCode 48: Rotate Image — Python Solution |
Medium |
Matrix | transpose then reverse rows |
| 49 |
LeetCode 49: Group Anagrams — Python Solution |
Medium |
Hashmap | canonical frequency key |
| 54 |
LeetCode 54: Spiral Matrix — Python Solution |
Medium |
Matrix | shrinking boundaries |
| 55 |
LeetCode 55: Jump Game — Python Solution |
Medium |
Array / String | greedy reachability |
| 56 |
LeetCode 56: Merge Intervals — Python Solution |
Medium |
Intervals | sorted sweep |
| 57 |
LeetCode 57: Insert Interval — Python Solution |
Medium |
Intervals | three-phase interval scan |
| 58 |
LeetCode 58: Length of Last Word — Python Solution |
Easy |
Array / String | reverse scan |
| 61 |
LeetCode 61: Rotate List — Python Solution |
Medium |
Linked List | cycle then cut |
| 68 |
LeetCode 68: Text Justification — Python Solution |
Hard |
Array / String | greedy line packing |
| 71 |
LeetCode 71: Simplify Path — Python Solution |
Medium |
Stack | canonical path stack |
| 73 |
LeetCode 73: Set Matrix Zeroes — Python Solution |
Medium |
Matrix | first-row marker compression |
| 76 |
LeetCode 76: Minimum Window Substring — Python Solution |
Hard |
Sliding Window | deficit-count window |
| 79 |
Leetcode 79 – Boggle Game / Word Search |
Medium |
Backtracking | depth-first search with backtracking |
| 80 |
LeetCode 80: Remove Duplicates from Sorted Array II — Python Solution |
Medium |
Array / String | bounded write pointer |
| 82 |
LeetCode 82: Remove Duplicates from Sorted List II — Python Solution |
Medium |
Linked List | run skipping |
| 86 |
LeetCode 86: Partition List — Python Solution |
Medium |
Linked List | stable dual lists |
| 88 |
LeetCode 88: Merge Sorted Array — Python Solution |
Easy |
Array / String | reverse two pointers |
| 92 |
LeetCode 92: Reverse Linked List II — Python Solution |
Medium |
Linked List | head insertion reversal |
| 98 |
LeetCode 98: Validate Binary Search Tree — Python Solution |
Medium |
Binary Search Tree | recursive value bounds |
| 100 |
LeetCode 100: Same Tree — Python Solution |
Easy |
Binary Tree General | paired recursion |
| 101 |
LeetCode 101: Symmetric Tree — Python Solution |
Easy |
Binary Tree General | mirror recursion |
| 102 |
LeetCode 102: Binary Tree Level Order Traversal — Python Solution |
Medium |
Binary Tree BFS | breadth-first levels |
| 103 |
LeetCode 103: Binary Tree Zigzag Level Order Traversal — Python Solution |
Medium |
Binary Tree BFS | alternating level output |
| 104 |
LeetCode 104: Maximum Depth of Binary Tree — Python Solution |
Easy |
Binary Tree General | recursive postorder |
| 105 |
LeetCode 105: Construct Binary Tree from Preorder and Inorder Traversal — Python Solution |
Medium |
Binary Tree General | indexed recursive partition |
| 106 |
LeetCode 106: Construct Binary Tree from Inorder and Postorder Traversal — Python Solution |
Medium |
Binary Tree General | reverse postorder partition |
| 112 |
LeetCode 112: Path Sum — Python Solution |
Easy |
Binary Tree General | remaining-sum DFS |
| 114 |
LeetCode 114: Flatten Binary Tree to Linked List — Python Solution |
Medium |
Binary Tree General | reverse preorder threading |
| 117 |
LeetCode 117: Populating Next Right Pointers in Each Node II — Python Solution |
Medium |
Binary Tree General | level linked-list construction |
| 121 |
LeetCode 121: Best Time to Buy and Sell Stock — Python Solution |
Easy |
Array / String | running minimum |
| 122 |
LeetCode 122: Best Time to Buy and Sell Stock II — Python Solution |
Medium |
Array / String | greedy positive differences |
| 124 |
LeetCode 124: Binary Tree Maximum Path Sum — Python Solution |
Hard |
Binary Tree General | postorder gain DP |
| 125 |
LeetCode 125: Valid Palindrome — Python Solution |
Easy |
Two Pointers | filtered two pointers |
| 127 |
LeetCode 127: Word Ladder — Python Solution |
Hard |
Graph BFS | wildcard-neighbor BFS |
| 128 |
LeetCode 128: Longest Consecutive Sequence — Python Solution |
Medium |
Hashmap | set sequence starts |
| 129 |
LeetCode 129: Sum Root to Leaf Numbers — Python Solution |
Medium |
Binary Tree General | prefix-number DFS |
| 130 |
LeetCode 130: Surrounded Regions — Python Solution |
Medium |
Graph General | boundary flood fill |
| 133 |
LeetCode 133: Clone Graph — Python Solution |
Medium |
Graph General | DFS memoized cloning |
| 134 |
LeetCode 134: Gas Station — Python Solution |
Medium |
Array / String | greedy restart |
| 135 |
LeetCode 135: Candy — Python Solution |
Hard |
Array / String | two directional passes |
| 138 |
LeetCode 138: Copy List with Random Pointer — Python Solution |
Medium |
Linked List | node-to-copy map |
| 141 |
LeetCode 141: Linked List Cycle — Python Solution |
Easy |
Linked List | Floyd cycle detection |
| 146 |
LeetCode 146: LRU Cache — Python Solution |
Medium |
Linked List | hash map plus doubly linked list |
| 150 |
LeetCode 150: Evaluate Reverse Polish Notation — Python Solution |
Medium |
Stack | operand stack |
| 151 |
LeetCode 151: Reverse Words in a String — Python Solution |
Medium |
Array / String | token normalization |
| 155 |
LeetCode 155: Min Stack — Python Solution |
Medium |
Stack | paired minimum stack |
| 167 |
LeetCode 167: Two Sum II – Input Array Is Sorted — Python Solution |
Medium |
Two Pointers | opposing two pointers |
| 169 |
LeetCode 169: Majority Element — Python Solution |
Easy |
Array / String | Boyer-Moore voting |
| 173 |
LeetCode 173: Binary Search Tree Iterator — Python Solution |
Medium |
Binary Tree General | lazy inorder stack |
| 189 |
LeetCode 189: Rotate Array — Python Solution |
Medium |
Array / String | three reversals |
| 199 |
LeetCode 199: Binary Tree Right Side View — Python Solution |
Medium |
Binary Tree BFS | level-order last node |
| 200 |
LeetCode 200: Number of Islands — Python Solution |
Medium |
Graph General | grid flood fill |
| 202 |
LeetCode 202: Happy Number — Python Solution |
Easy |
Hashmap | cycle detection |
| 205 |
LeetCode 205: Isomorphic Strings — Python Solution |
Easy |
Hashmap | bidirectional mapping |
| 207 |
LeetCode 207: Course Schedule — Python Solution |
Medium |
Graph General | Kahn topological sort |
| 208 |
LeetCode 208: Implement Trie (Prefix Tree) — Python Solution |
Medium |
Trie | nested child maps |
| 209 |
LeetCode 209: Minimum Size Subarray Sum — Python Solution |
Medium |
Sliding Window | positive sliding window |
| 210 |
LeetCode 210: Course Schedule II — Python Solution |
Medium |
Graph General | topological ordering |
| 211 |
LeetCode 211: Design Add and Search Words Data Structure — Python Solution |
Medium |
Trie | trie plus wildcard DFS |
| 212 |
LeetCode 212: Word Search II — Python Solution |
Hard |
Trie | trie-guided board DFS |
| 219 |
LeetCode 219: Contains Duplicate II — Python Solution |
Easy |
Hashmap | last-index tracking |
| 222 |
LeetCode 222: Count Complete Tree Nodes — Python Solution |
Medium |
Binary Tree General | perfect-subtree detection |
| 224 |
LeetCode 224: Basic Calculator — Python Solution |
Hard |
Stack | sign-context stack |
| 226 |
LeetCode 226: Invert Binary Tree — Python Solution |
Easy |
Binary Tree General | recursive swap |
| 228 |
LeetCode 228: Summary Ranges — Python Solution |
Easy |
Intervals | run detection |
| 230 |
LeetCode 230: Kth Smallest Element in a BST — Python Solution |
Medium |
Binary Search Tree | iterative inorder |
| 236 |
LeetCode 236: Lowest Common Ancestor of a Binary Tree — Python Solution |
Medium |
Binary Tree General | postorder target propagation |
| 238 |
LeetCode 238: Product of Array Except Self — Python Solution |
Medium |
Array / String | prefix and suffix products |
| 242 |
LeetCode 242: Valid Anagram — Python Solution |
Easy |
Hashmap | frequency equality |
| 274 |
LeetCode 274: H-Index — Python Solution |
Medium |
Array / String | sorting and threshold scan |
| 289 |
LeetCode 289: Game of Life — Python Solution |
Medium |
Matrix | encoded in-place transition |
| 290 |
LeetCode 290: Word Pattern — Python Solution |
Easy |
Hashmap | bidirectional token mapping |
| 380 |
LeetCode 380: Insert Delete GetRandom O(1) — Python Solution |
Medium |
Array / String | array plus index map |
| 383 |
LeetCode 383: Ransom Note — Python Solution |
Easy |
Hashmap | frequency consumption |
| 392 |
LeetCode 392: Is Subsequence — Python Solution |
Easy |
Two Pointers | subsequence pointer |
| 399 |
LeetCode 399: Evaluate Division — Python Solution |
Medium |
Graph General | weighted graph search |
| 433 |
LeetCode 433: Minimum Genetic Mutation — Python Solution |
Medium |
Graph BFS | single-character BFS |
| 452 |
LeetCode 452: Minimum Number of Arrows to Burst Balloons — Python Solution |
Medium |
Intervals | greedy earliest end |
| 530 |
LeetCode 530: Minimum Absolute Difference in BST — Python Solution |
Easy |
Binary Search Tree | inorder adjacent difference |
| 637 |
LeetCode 637: Average of Levels in Binary Tree — Python Solution |
Easy |
Binary Tree BFS | level aggregation |
| 733 |
Leetcode 733 – FloodFill |
Easy |
Graph General | grid flood fill |
| 909 |
LeetCode 909: Snakes and Ladders — Python Solution |
Medium |
Graph BFS | board-index BFS |
| 1768 |
Leetcode 1768 – Merge Strings Alternatively |
Easy |
Array / String | two-pointer interleaving |