X LeetCode Questions
51 questions all-time · 8 easy · 31 medium · 12 hard
| # | Problem | Difficulty | Frequency | Acceptance |
|---|---|---|---|---|
| 1 | Trapping Rain Water Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack | Hard | 100 | 0.7% |
| 2 | Merge Intervals Array, Sorting | Medium | 100 | 0.5% |
| 3 | LRU Cache Hash Table, Linked List, Design, Doubly-Linked List | Medium | 100 | 0.5% |
| 4 | Flatten Nested List Iterator Stack, Tree, Depth-First Search, Design, Queue, Iterator | Medium | 100 | 0.7% |
| 5 | Tweet Counts Per Frequency Hash Table, String, Binary Search, Design, Sorting, Ordered Set | Medium | 100 | 0.5% |
| 6 | Regular Expression Matching String, Dynamic Programming, Recursion | Hard | 97 | 0.3% |
| 7 | Integer to Roman Hash Table, Math, String | Medium | 97 | 0.7% |
| 8 | Valid Parentheses String, Stack | Easy | 97 | 0.4% |
| 9 | Merge k Sorted Lists Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort | Hard | 97 | 0.6% |
| 10 | Multiply Strings Math, String, Simulation | Medium | 97 | 0.4% |
| 11 | Wildcard Matching String, Dynamic Programming, Greedy, Recursion | Hard | 97 | 0.3% |
| 12 | Permutation Sequence Math, Recursion | Hard | 97 | 0.5% |
| 13 | Pascal's Triangle Array, Dynamic Programming | Easy | 97 | 0.8% |
| 14 | Word Break II Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization | Hard | 97 | 0.6% |
| 15 | Time Needed to Buy Tickets Array, Queue, Simulation | Easy | 97 | 0.7% |
| 16 | Max Points on a Line Array, Hash Table, Math, Geometry | Hard | 97 | 0.3% |
| 17 | One Edit Distance Two Pointers, String | Medium | 97 | 0.3% |
| 18 | Happy Number Hash Table, Math, Two Pointers | Easy | 97 | 0.6% |
| 19 | Reverse Linked List Linked List, Recursion | Easy | 97 | 0.8% |
| 20 | Implement Trie (Prefix Tree) Hash Table, String, Design, Trie | Medium | 97 | 0.7% |
| 21 | The Skyline Problem Array, Divide and Conquer, Binary Indexed Tree, Segment Tree, Sweep Line, Sorting, Heap (Priority Queue), Ordered Set | Hard | 97 | 0.5% |
| 22 | Lowest Common Ancestor of a Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree | Medium | 97 | 0.7% |
| 23 | Flatten 2D Vector Array, Two Pointers, Design, Iterator | Medium | 97 | 0.5% |
| 24 | Alien Dictionary Array, String, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort | Hard | 97 | 0.4% |
| 25 | Best Meeting Point Array, Math, Sorting, Matrix | Hard | 97 | 0.6% |
| 26 | Design Skiplist Linked List, Design | Hard | 97 | 0.6% |
| 27 | Number of Connected Components in an Undirected Graph Depth-First Search, Breadth-First Search, Union-Find, Graph Theory | Medium | 97 | 0.7% |
| 28 | Design Twitter Hash Table, Linked List, Design, Heap (Priority Queue) | Medium | 97 | 0.4% |
| 29 | Kth Smallest Element in a Sorted Matrix Array, Binary Search, Sorting, Heap (Priority Queue), Matrix | Medium | 97 | 0.6% |
| 30 | Insert Delete GetRandom O(1) Array, Hash Table, Math, Design, Randomized | Medium | 97 | 0.6% |
| 31 | Trapping Rain Water II Array, Breadth-First Search, Heap (Priority Queue), Matrix | Hard | 97 | 0.6% |
| 32 | Minimum Genetic Mutation Hash Table, String, Breadth-First Search | Medium | 97 | 0.6% |
| 33 | Minimum Number of Steps to Make Two Strings Anagram Hash Table, String, Counting | Medium | 97 | 0.8% |
| 34 | Validate IP Address String | Medium | 97 | 0.3% |
| 35 | Count Student Number in Departments Database | Medium | 97 | 0.6% |
| 36 | Rectangles Area Database | Medium | 97 | 0.7% |
| 37 | Investments in 2016 Database | Medium | 97 | 0.5% |
| 38 | Customer Placing the Largest Number of Orders Database | Easy | 97 | 0.6% |
| 39 | Tree Node Database | Medium | 97 | 0.8% |
| 40 | Invalid Tweets Database | Easy | 97 | 0.9% |
| 41 | Number of Black Blocks Array, Hash Table, Enumeration | Medium | 97 | 0.4% |
| 42 | Masking Personal Information String | Medium | 97 | 0.6% |
| 43 | Design Authentication Manager Hash Table, Linked List, Design, Doubly-Linked List | Medium | 97 | 0.6% |
| 44 | Minimum Elements to Add to Form a Given Sum Array, Greedy | Medium | 97 | 0.5% |
| 45 | Binary Gap Bit Manipulation | Easy | 97 | 0.7% |
| 46 | Finding the Users Active Minutes Array, Hash Table | Medium | 97 | 0.8% |
| 47 | Process Tasks Using Servers Array, Heap (Priority Queue) | Medium | 97 | 0.4% |
| 48 | Remove All Occurrences of a Substring String, Stack, Simulation | Medium | 97 | 0.8% |
| 49 | Count Sub Islands Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix | Medium | 97 | 0.7% |
| 50 | Largest Plus Sign Array, Dynamic Programming | Medium | 63 | 0.5% |
| 51 | Minimum Cost to Connect Sticks Array, Greedy, Heap (Priority Queue) | Medium | 52 | 0.7% |
How to read this list
The tabs at the top split the questions by how recently people said they were asked in interviews. "Last 30 Days" is the past month, "Last 3 Months" is the past quarter, and so on. "All Time" is every question on record for this company.
Frequency is a score from 0 to 100 for how often a question showed up in that time window. A higher number means it came up more often, so the list starts with the most common questions first. Acceptance is the share of submissions that pass on LeetCode. Click any question to open it on LeetCode.