LeetCode 150
Pick a topic section โ each has its own overview listing all problems. Solution pages are added as each problem is taught.
Arrays & Strings
Array / String
Merge Sorted Array, Trapping Rain Water, Zigzag Conversion and 21 more.
Two Pointers
Valid Palindrome, 3Sum, Container With Most Water and 2 more.
Sliding Window
Min Size Subarray Sum, Longest Substring, Minimum Window Substring.
Matrix
Valid Sudoku, Spiral Matrix, Rotate Image, Set Matrix Zeroes, Game of Life.
Hashing
Hashmap
Ransom Note, Two Sum, Group Anagrams, Longest Consecutive Sequence and 5 more.
Intervals
Summary Ranges, Merge Intervals, Insert Interval, Min Arrows to Burst Balloons.
Stack & Linked List
Stack
Valid Parentheses, Min Stack, Evaluate Reverse Polish Notation, Basic Calculator.
Linked List
Linked List Cycle, Merge Two Sorted Lists, Reverse Nodes in k-Group, LRU Cache and 7 more.
Trees
Binary Tree General
Invert, Same Tree, Symmetric, LCA, BT Max Path Sum and 9 more.
Binary Tree BFS
Right Side View, Average of Levels, Level Order, Zigzag Level Order.
Binary Search Tree
Min Absolute Difference, Kth Smallest, Validate BST.
Graphs
Graph General
Number of Islands, Clone Graph, Course Schedule I & II and 2 more.
Graph BFS
Snakes and Ladders, Minimum Genetic Mutation, Word Ladder.
Trie
Implement Trie, Add and Search Words, Word Search II.
Backtracking & Search
Backtracking
Letter Combinations, Permutations, N-Queens II, Word Search and 3 more.
Divide & Conquer
Sorted Array to BST, Sort List, Construct Quad Tree, Merge k Sorted Lists.
Kadane's Algorithm
Maximum Subarray, Maximum Sum Circular Subarray.
Binary Search
Search Insert Position, Find Peak Element, Median of Two Sorted Arrays and 4 more.
Heap
Kth Largest Element, IPO, Find K Pairs, Find Median from Data Stream.
Math, Bits & DP
Bit Manipulation
Add Binary, Single Number, Reverse Bits, Number of 1 Bits and 2 more.
Math
Palindrome Number, Factorial Trailing Zeroes, Pow(x,n), Max Points on a Line.
1D Dynamic Programming
Climbing Stairs, House Robber, Coin Change, Longest Increasing Subsequence.
Multidimensional DP
Triangle, Minimum Path Sum, Edit Distance, Maximal Square and 5 more.