LinkedIn LeetCode Questions
100 questions all-time · 18 easy · 64 medium · 18 hard
| # | Problem | Difficulty | Frequency | Acceptance |
|---|---|---|---|---|
| 1 | Max Stack Linked List, Stack, Design, Doubly-Linked List, Ordered Set | Hard | 100 | 45.5% |
| 2 | Nested List Weight Sum II Stack, Depth-First Search, Breadth-First Search | Medium | 95 | 65.6% |
| 3 | All O`one Data Structure Hash Table, Linked List, Design, Doubly-Linked List | Hard | 94 | 44.1% |
| 4 | Word Ladder Hash Table, String, Breadth-First Search | Hard | 79 | 42.8% |
| 5 | Find the Celebrity Two Pointers, Graph, Interactive | Medium | 79 | 48.4% |
| 6 | Nested List Weight Sum Depth-First Search, Breadth-First Search | Medium | 78 | 85.5% |
| 7 | Shortest Word Distance II Array, Hash Table, Two Pointers, String, Design | Medium | 77 | 62.1% |
| 8 | Maximum Subarray Array, Divide and Conquer, Dynamic Programming | Medium | 77 | 52.1% |
| 9 | Find Leaves of Binary Tree Tree, Depth-First Search, Binary Tree | Medium | 77 | 81.1% |
| 10 | Valid Parentheses String, Stack | Easy | 77 | 42.3% |
| 11 | Number of Islands Array, Depth-First Search, Breadth-First Search, Union Find, Matrix | Medium | 76 | 62.3% |
| 12 | Maximum Product Subarray Array, Dynamic Programming | Medium | 73 | 34.9% |
| 13 | Can Place Flowers Array, Greedy | Easy | 72 | 28.9% |
| 14 | Search in Rotated Sorted Array Array, Binary Search | Medium | 71 | 42.8% |
| 15 | Pow(x, n) Math, Recursion | Medium | 71 | 37.0% |
| 16 | Binary Tree Upside Down Tree, Depth-First Search, Binary Tree | Medium | 69 | 64.5% |
| 17 | Insert Delete GetRandom O(1) Array, Hash Table, Math, Design, Randomized | Medium | 69 | 55.0% |
| 18 | Partition to K Equal Sum Subsets Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask | Medium | 69 | 38.1% |
| 19 | Find First and Last Position of Element in Sorted Array Array, Binary Search | Medium | 68 | 46.8% |
| 20 | Paint House Array, Dynamic Programming | Medium | 68 | 63.7% |
| 21 | Serialize and Deserialize Binary Tree String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree | Hard | 66 | 59.0% |
| 22 | Minimum Window Substring Hash Table, String, Sliding Window | Hard | 65 | 45.4% |
| 23 | Maximum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree | Easy | 64 | 77.1% |
| 24 | Factor Combinations Backtracking | Medium | 64 | 50.2% |
| 25 | Shortest Word Distance Array, String | Easy | 64 | 65.9% |
| 26 | Exclusive Time of Functions Array, Stack | Medium | 64 | 64.8% |
| 27 | Lowest Common Ancestor of a Binary Tree Tree, Depth-First Search, Binary Tree | Medium | 63 | 66.8% |
| 28 | Kth Largest Element in an Array Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect | Medium | 63 | 68.0% |
| 29 | Letter Combinations of a Phone Number Hash Table, String, Backtracking | Medium | 63 | 63.9% |
| 30 | Lowest Common Ancestor of a Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree | Medium | 62 | 68.3% |
| 31 | Isomorphic Strings Hash Table, String | Easy | 62 | 46.9% |
| 32 | Symmetric Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree | Easy | 61 | 59.3% |
| 33 | Sort Transformed Array Array, Math, Two Pointers, Sorting | Medium | 61 | 57.1% |
| 34 | Merge Intervals Array, Sorting | Medium | 61 | 49.4% |
| 35 | Count Integers in Intervals Design, Segment Tree, Ordered Set | Hard | 60 | 34.2% |
| 36 | Valid Perfect Square Math, Binary Search | Easy | 60 | 44.2% |
| 37 | Valid Number String | Hard | 60 | 21.6% |
| 38 | Kth Smallest Product of Two Sorted Arrays Array, Binary Search | Hard | 60 | 30.9% |
| 39 | Max Points on a Line Array, Hash Table, Math, Geometry | Hard | 59 | 29.0% |
| 40 | Second Minimum Node In a Binary Tree Tree, Depth-First Search, Binary Tree | Easy | 59 | 45.3% |
| 41 | Closest Binary Search Tree Value II Two Pointers, Stack, Tree, Depth-First Search, Binary Search Tree, Heap (Priority Queue), Binary Tree | Hard | 59 | 60.3% |
| 42 | House Robber Array, Dynamic Programming | Medium | 58 | 52.3% |
| 43 | Evaluate Reverse Polish Notation Array, Math, Stack | Medium | 58 | 55.0% |
| 44 | Repeated DNA Sequences Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function | Medium | 58 | 51.3% |
| 45 | LRU Cache Hash Table, Linked List, Design, Doubly-Linked List | Medium | 56 | 45.2% |
| 46 | Binary Tree Level Order Traversal Tree, Breadth-First Search, Binary Tree | Medium | 56 | 70.6% |
| 47 | Can I Win Math, Dynamic Programming, Bit Manipulation, Memoization, Game Theory, Bitmask | Medium | 56 | 30.4% |
| 48 | Longest Palindromic Subsequence String, Dynamic Programming | Medium | 56 | 64.1% |
| 49 | Permutations II Array, Backtracking, Sorting | Medium | 55 | 61.6% |
| 50 | Merge Two Sorted Lists Linked List, Recursion | Easy | 55 | 66.8% |
| 51 | Flatten Nested List Iterator Stack, Tree, Depth-First Search, Design, Queue, Iterator | Medium | 55 | 65.2% |
| 52 | Shortest Word Distance III Array, String | Medium | 55 | 59.1% |
| 53 | Permutations Array, Backtracking | Medium | 55 | 80.7% |
| 54 | Palindromic Substrings Two Pointers, String, Dynamic Programming | Medium | 53 | 71.7% |
| 55 | Sparse Matrix Multiplication Array, Hash Table, Matrix | Medium | 53 | 68.9% |
| 56 | Find K Pairs with Smallest Sums Array, Heap (Priority Queue) | Medium | 53 | 40.7% |
| 57 | Two Sum Array, Hash Table | Easy | 53 | 55.8% |
| 58 | Binary Tree Zigzag Level Order Traversal Tree, Breadth-First Search, Binary Tree | Medium | 53 | 61.7% |
| 59 | Merge k Sorted Lists Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort | Hard | 53 | 56.8% |
| 60 | Product of Array Except Self Array, Prefix Sum | Medium | 52 | 67.8% |
| 61 | Text Justification Array, String, Simulation | Hard | 52 | 48.1% |
| 62 | Find K Closest Elements Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue) | Medium | 50 | 48.7% |
| 63 | Sum of Square Numbers Math, Two Pointers, Binary Search | Medium | 50 | 36.5% |
| 64 | Time to Cross a Bridge Array, Heap (Priority Queue), Simulation | Hard | 50 | 43.5% |
| 65 | Maximize Total Tastiness of Purchased Fruits Array, Dynamic Programming | Medium | 50 | 64.5% |
| 66 | Find Largest Value in Each Tree Row Tree, Depth-First Search, Breadth-First Search, Binary Tree | Medium | 50 | 66.3% |
| 67 | Maximum Number of Non-overlapping Palindrome Substrings Two Pointers, String, Dynamic Programming, Greedy | Hard | 50 | 41.6% |
| 68 | Insert Interval Array | Medium | 50 | 43.5% |
| 69 | Minimum Deletions to Make Array Divisible Array, Math, Sorting, Heap (Priority Queue), Number Theory | Hard | 50 | 57.7% |
| 70 | Insert Delete GetRandom O(1) - Duplicates allowed Array, Hash Table, Math, Design, Randomized | Hard | 50 | 35.8% |
| 71 | Two Sum III - Data structure design Array, Hash Table, Two Pointers, Design, Data Stream | Easy | 50 | 38.7% |
| 72 | Create Binary Tree From Descriptions Array, Hash Table, Tree, Binary Tree | Medium | 50 | 81.6% |
| 73 | Binary Search Tree Iterator Stack, Tree, Design, Binary Search Tree, Binary Tree, Iterator | Medium | 50 | 74.9% |
| 74 | Max Area of Island Array, Depth-First Search, Breadth-First Search, Union Find, Matrix | Medium | 48 | 73.2% |
| 75 | Edit Distance String, Dynamic Programming | Medium | 46 | 58.8% |
| 76 | Rotate List Linked List, Two Pointers | Medium | 46 | 39.9% |
| 77 | Graph Valid Tree Depth-First Search, Breadth-First Search, Union Find, Graph | Medium | 46 | 49.3% |
| 78 | Valid Triangle Number Array, Two Pointers, Binary Search, Greedy, Sorting | Medium | 46 | 52.3% |
| 79 | Number of Connected Components in an Undirected Graph Depth-First Search, Breadth-First Search, Union Find, Graph | Medium | 43 | 64.2% |
| 80 | Min Stack Stack, Design | Medium | 43 | 56.4% |
| 81 | Shuffle an Array Array, Math, Design, Randomized | Medium | 41 | 59.0% |
| 82 | Word Ladder II Hash Table, String, Backtracking, Breadth-First Search | Hard | 41 | 27.2% |
| 83 | Combination Sum Array, Backtracking | Medium | 37 | 74.7% |
| 84 | Merge Sorted Array Array, Two Pointers, Sorting | Easy | 37 | 52.9% |
| 85 | Longest Palindromic Substring Two Pointers, String, Dynamic Programming | Medium | 37 | 35.8% |
| 86 | Integer to Roman Hash Table, Math, String | Medium | 33 | 68.6% |
| 87 | Intersection of Two Arrays Array, Hash Table, Two Pointers, Binary Search, Sorting | Easy | 33 | 76.5% |
| 88 | Fizz Buzz Math, String, Simulation | Easy | 33 | 74.4% |
| 89 | Diameter of Binary Tree Tree, Depth-First Search, Binary Tree | Easy | 28 | 63.6% |
| 90 | Same Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree | Easy | 28 | 65.1% |
| 91 | House Robber IV Array, Binary Search, Dynamic Programming, Greedy | Medium | 28 | 65.2% |
| 92 | Longest Substring Without Repeating Characters Hash Table, String, Sliding Window | Medium | 28 | 36.9% |
| 93 | Median of Two Sorted Arrays Array, Binary Search, Divide and Conquer | Hard | 28 | 43.8% |
| 94 | House Robber II Array, Dynamic Programming | Medium | 28 | 43.6% |
| 95 | Next Permutation Array, Two Pointers | Medium | 21 | 43.1% |
| 96 | Reorder List Linked List, Two Pointers, Stack, Recursion | Medium | 21 | 62.5% |
| 97 | Minimum Time to Type Word Using Special Typewriter String, Greedy | Easy | 21 | 77.7% |
| 98 | Design Add and Search Words Data Structure String, Depth-First Search, Design, Trie | Medium | 21 | 47.1% |
| 99 | Best Time to Buy and Sell Stock Array, Dynamic Programming | Easy | 21 | 55.3% |
| 100 | Validate Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree | Medium | 21 | 34.4% |
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.