Curation of great Leetcode questions, categorized by topic/concept. My criteria for curation is that questions must be valuable, and not just difficult for the sake of being difficult.
Valuable questions can usually be solved in a variety of ways with different time/space efficiencies (through the use of various data structures), or require the application of certain common and reusable techniques.
Bad questions are those that are extremely difficult for the sake of being so, and require knowledge of some uncommon technique to solve (which cannot be applied outside a very narrow scope).
Essentially, this is a curation of questions that I personally use to prepare for technical interviews.
- Maximum subarray (easy)
- Reverse string (easy)
- 3sum (medium)
- Decode string (medium)
- Kth largest element in an array (medium)
- Longest increasing subsequence (medium)
- Maximum product subarray (medium)
- Merge sorted array (medium)
- Product of array except self (medium)
- Search in rotated sorted array (medium)
- Sort colors (medium)
- Subarray sum equals k (medium)
- Count of smaller numbers after self (hard)
- Longest consecutive sequence (hard)
- Merge k sorted lists (hard)
- Sliding window maximum (hard)
- Trapping rain water (hard)
- Longest substring without repeating characters (medium)
- Permutation in string (medium)
- Minimum window substring (hard)
- Container with most water (medium)
- Merge intervals (medium)
- Non-overlapping intervals (medium)
- Insert interval (hard)
- Kth largest element in an array (medium)
- Find median from data stream (hard)
- Intersection of two linked lists (easy)
- Linked list cycle (easy)
- Palindrome linked list (easy)
- Remove duplicates from sorted list (easy)
- Reverse linked list (easy)
- Merge two sorted lists (medium)
- Reverse linked list II (medium)
- Rotate list (medium)
- Merge k sorted lists (hard)
- Balanced binary tree (easy)
- Convert sorted array to binary search tree (easy)
- Invert binary tree (easy)
- Merge two binary trees (easy)
- Symmetric tree (easy)
- Binary tree inorder traversal (medium)
- Binary tree level order traversal (medium)
- Binary tree zigzag level order traversal (medium)
- Binary tree right side view (medium)
- Construct binary tree from preorder and inorder traversal (medium)
- Construct binary tree from preorder and postorder traversal (medium)
- Flatten binary tree to linked list (medium)
- Kth smallest element in a BST (medium)
- Lowest common ancestor of a binary tree (medium)
- Maximum binary tree (medium)
- Maximum level sum of a binary tree (medium)
- Unique binary search trees (medium)
- Validate binary search tree (medium)
- Flood fill (easy)
- Accounts merge (medium)
- Cheapest flights within k stops (medium)
- Course schedule (medium)
- Course schedule II (medium)
- Graph valid tree (medium)
- Pacific atlantic water flow (medium)
- Word search (medium)
- Decode ways (medium)
- Permutations (medium)
- Permutations II (permutations with repetitions) (medium)
- Subsets (medium)
- Interleaving string (hard)
- Remove invalid parentheses (hard)
- Climbing stairs (easy)
- Decode ways (medium)
- Jump game (medium)
- Longest increasing subsequence (medium)
- Minimum path sum (medium)
- Unique paths (medium)
- Interleaving string (hard)
- Jump game II (hard)
- Implement queue using stacks (easy)
- Min stack (easy)
- Binary search tree iterator (medium) (implementation should be lazy)
- Flatten nested list iterator (medium) (implementation should be lazy)
- Implement trie (prefix tree) (medium)
- LRU cache (medium)