grindmapcompany-wise LeetCode
All companies

TikTok LeetCode Questions

351 questions all-time · 34 easy · 245 medium · 72 hard
# Problem Difficulty Frequency Acceptance
1LRU Cache
Medium
100
0.5%
2Number of Islands
Medium
99
0.6%
3Longest Increasing Subsequence
Medium
90
0.6%
4Longest Substring Without Repeating Characters
Medium
88
0.4%
5Number of Distinct Islands
Medium
87
0.6%
6Course Schedule II
Medium
87
0.6%
7Meeting Rooms II
Medium
87
0.5%
8Merge Intervals
Medium
84
0.5%
9Trapping Rain Water
Hard
84
0.7%
10Course Schedule
Medium
84
0.5%
11Subarray With Elements Greater Than Varying Threshold
Hard
84
0.5%
12Text Justification
Hard
80
0.5%
13Decode String
Medium
78
0.6%
14Word Search
Medium
77
0.5%
15Longest Palindromic Substring
Medium
75
0.4%
16N-Queens
Hard
75
0.8%
17Minimum Window Substring
Hard
75
0.5%
18Search in Rotated Sorted Array
Medium
74
0.5%
193Sum
Medium
72
0.4%
20Top K Frequent Elements
Medium
72
0.7%
21Subarray Sum Equals K
Medium
72
0.5%
22Sqrt(x)
Easy
71
0.4%
23Coin Change
Medium
71
0.5%
24Minimum Swaps to Group All 1's Together
Medium
71
0.6%
25Spiral Matrix
Medium
70
0.6%
26Merge k Sorted Lists
Hard
68
0.6%
27Best Time to Buy and Sell Stock
Easy
68
0.6%
28Longest Consecutive Sequence
Medium
68
0.5%
29Making A Large Island
Hard
68
0.6%
30Maximum Value at a Given Index in a Bounded Array
Medium
68
0.4%
31Valid Parentheses
Easy
67
0.4%
32House Robber
Medium
67
0.5%
33Kth Largest Element in an Array
Medium
67
0.7%
34Basic Calculator II
Medium
67
0.5%
35Maximum Swap
Medium
67
0.5%
36Basic Calculator III
Hard
67
0.5%
37Longest Happy String
Medium
67
0.7%
38Snapshot Array
Medium
67
0.4%
39Two Sum
Easy
65
0.6%
40Word Ladder
Hard
65
0.5%
41Generate Parentheses
Medium
63
0.8%
42Sort Colors
Medium
63
0.7%
43Count the Hidden Sequences
Medium
63
0.6%
44Longest Increasing Path in a Matrix
Hard
63
0.6%
45Insert Delete GetRandom O(1)
Medium
63
0.6%
46Valid Parenthesis String
Medium
63
0.4%
47Max Area of Island
Medium
63
0.7%
48Design HashMap
Easy
63
0.7%
49Construct Binary Tree from Preorder and Inorder Traversal
Medium
61
0.7%
50Add Strings
Easy
61
0.5%
51Meeting Rooms III
Hard
61
0.5%
52Closest Prime Numbers in Range
Medium
61
0.5%
53Daily Temperatures
Medium
61
0.7%
54Word Search II
Hard
61
0.4%
55Edit Distance
Medium
59
0.6%
56Binary Tree Maximum Path Sum
Hard
59
0.4%
57Word Break II
Hard
59
0.6%
58Reorder List
Medium
59
0.7%
59Serialize and Deserialize Binary Tree
Hard
59
0.6%
60Length of the Longest Alphabetical Continuous Substring
Medium
59
0.6%
61Most Popular Video Creator
Medium
59
0.5%
62Find the Score of All Prefixes of an Array
Medium
59
0.7%
63Count Complete Subarrays in an Array
Medium
59
0.8%
64Minimum Moves to Pick K Ones
Hard
59
0.2%
65Incremental Memory Leak
Medium
59
0.7%
66Minimum Operations to Make Character Frequencies Equal
Hard
59
0.3%
67Minimum Cost Good Caption
Hard
59
0.2%
68Lexicographically Smallest Generated String
Hard
59
0.5%
69Combination Sum
Medium
57
0.8%
70Climbing Stairs
Easy
57
0.5%
71Simplify Path
Medium
57
0.5%
72Binary Tree Right Side View
Medium
57
0.7%
73Reverse Linked List
Easy
57
0.8%
74Basic Calculator
Hard
57
0.5%
75Find Median from Data Stream
Hard
57
0.5%
76Bus Routes
Hard
57
0.5%
77Shortest Path in a Grid with Obstacles Elimination
Hard
57
0.5%
78Container With Most Water
Medium
54
0.6%
79Find First and Last Position of Element in Sorted Array
Medium
54
0.5%
80Group Anagrams
Medium
54
0.7%
81Jump Game
Medium
54
0.4%
82Subsets
Medium
54
0.8%
83Word Break
Medium
54
0.5%
84Find Peak Element
Medium
54
0.5%
85Lowest Common Ancestor of a Binary Tree
Medium
54
0.7%
86Sliding Window Maximum
Hard
54
0.5%
87Longest Substring with At Least K Repeating Characters
Medium
54
0.5%
88Pacific Atlantic Water Flow
Medium
54
0.6%
89Asteroid Collision
Medium
54
0.5%
90Koko Eating Bananas
Medium
54
0.5%
91Possible Bipartition
Medium
54
0.5%
92Rotting Oranges
Medium
54
0.6%
93Shortest Bridge
Medium
54
0.6%
94Design Add and Search Words Data Structure
Medium
54
0.5%
95Regular Expression Matching
Hard
51
0.3%
96Longest Common Prefix
Easy
51
0.5%
97Reverse Nodes in k-Group
Hard
51
0.7%
98Jump Game II
Medium
51
0.4%
99Permutations
Medium
51
0.8%
100Maximum Subarray
Medium
51
0.5%
101Restore IP Addresses
Medium
51
0.6%
102Minimum Size Subarray Sum
Medium
51
0.5%
103Meeting Rooms
Easy
51
0.6%
104Alien Dictionary
Hard
51
0.4%
105Remove Duplicate Letters
Medium
51
0.5%
106Evaluate Division
Medium
51
0.6%
107Random Pick with Weight
Medium
51
0.5%
108Subarray Sums Divisible by K
Medium
51
0.6%
109Capacity To Ship Packages Within D Days
Medium
51
0.7%
110Minimum Remove to Make Valid Parentheses
Medium
51
0.7%
111Gas Station
Medium
51
0.5%
112Greatest Common Divisor of Strings
Easy
51
0.5%
113Longest Valid Parentheses
Hard
48
0.4%
114Multiply Strings
Medium
48
0.4%
115Permutations II
Medium
48
0.6%
116Best Time to Buy and Sell Stock II
Medium
48
0.7%
117Find Minimum in Rotated Sorted Array
Medium
48
0.5%
118Compare Version Numbers
Medium
48
0.5%
119Rotate Array
Medium
48
0.5%
120Move Zeroes
Easy
48
0.6%
121Partition Equal Subset Sum
Medium
48
0.5%
122Design In-Memory File System
Hard
48
0.5%
123Kth Missing Positive Number
Easy
48
0.6%
124Find the Length of the Longest Common Prefix
Medium
48
0.6%
125Matchsticks to Square
Medium
48
0.4%
126Water and Jug Problem
Medium
48
0.5%
127Brightest Position on Street
Medium
48
0.6%
128Super Egg Drop
Hard
48
0.3%
129Longest Mountain in Array
Medium
48
0.4%
130Next Permutation
Medium
44
0.5%
131Minimum Path Sum
Medium
44
0.7%
132Binary Tree Zigzag Level Order Traversal
Medium
44
0.6%
133Intersection of Two Linked Lists
Easy
44
0.6%
134House Robber II
Medium
44
0.5%
135Walls and Gates
Medium
44
0.6%
136Remove Invalid Parentheses
Hard
44
0.5%
137Kth Smallest Element in a Sorted Matrix
Medium
44
0.6%
138Frog Jump
Hard
44
0.5%
139Split Message Based on Limit
Hard
44
0.4%
140Open the Lock
Medium
44
0.6%
141Convert Binary Search Tree to Sorted Doubly Linked List
Medium
44
0.7%
142Reorganize String
Medium
44
0.6%
143Score of Parentheses
Medium
44
0.6%
144Minimize Malware Spread
Hard
44
0.4%
145Remove All Adjacent Duplicates in String II
Medium
44
0.6%
146Number of Good Leaf Nodes Pairs
Medium
44
0.7%
147Minimum Moves to Spread Stones Over Grid
Medium
44
0.5%
148Combinations
Medium
44
0.7%
149Find All Duplicates in an Array
Medium
44
0.8%
150Min Cost to Connect All Points
Medium
44
0.7%
151Reorder Routes to Make All Paths Lead to the City Zero
Medium
44
0.7%
152Numbers At Most N Given Digit Set
Hard
44
0.5%
153Binary Tree Longest Consecutive Sequence
Medium
44
0.5%
154Largest Rectangle in Histogram
Hard
44
0.5%
155Shortest Unsorted Continuous Subarray
Medium
44
0.4%
156Minimum Operations to Write the Letter Y on a Grid
Medium
44
0.6%
157Course Schedule IV
Medium
44
0.6%
158Integer to Roman
Medium
39
0.7%
159Swap Nodes in Pairs
Medium
39
0.7%
160Combination Sum II
Medium
39
0.6%
161Best Time to Buy and Sell Stock III
Hard
39
0.5%
162Find All Possible Recipes from Given Supplies
Medium
39
0.6%
163Best Time to Buy and Sell Stock IV
Hard
39
0.5%
164Maximal Square
Medium
39
0.5%
165Longest Substring with At Most K Distinct Characters
Medium
39
0.5%
166Design Tic-Tac-Toe
Medium
39
0.6%
167Search a 2D Matrix
Medium
39
0.5%
168Insert Delete GetRandom O(1) - Duplicates allowed
Hard
39
0.4%
169Remove K Digits
Medium
39
0.4%
170Heaters
Medium
39
0.4%
171Merge Operations to Turn Array Into a Palindrome
Medium
39
0.7%
172Design Search Autocomplete System
Hard
39
0.5%
173Stickers to Spell Word
Hard
39
0.5%
174Best Time to Buy and Sell Stock with Transaction Fee
Medium
39
0.7%
175Max Consecutive Ones III
Medium
39
0.7%
176Shortest Path in Binary Matrix
Medium
39
0.5%
177Longest Common Subsequence
Medium
39
0.6%
178Number of Visible People in a Queue
Hard
39
0.7%
179Maximum Points You Can Obtain from Cards
Medium
39
0.6%
180Tree Diameter
Medium
39
0.6%
181Maximum Product of Three Numbers
Easy
39
0.5%
182Snakes and Ladders
Medium
39
0.5%
1832 Keys Keyboard
Medium
39
0.6%
184Sentence Similarity III
Medium
39
0.5%
185Unique Paths II
Medium
39
0.4%
186Make Costs of Paths Equal in a Binary Tree
Medium
39
0.6%
187Minimum Cost For Tickets
Medium
39
0.7%
188Regions Cut By Slashes
Medium
39
0.8%
189Design Memory Allocator
Medium
39
0.5%
190Robot Room Cleaner
Hard
39
0.8%
191Cheapest Flights Within K Stops
Medium
39
0.4%
192Path Sum III
Medium
39
0.5%
193Merge Two Sorted Lists
Easy
33
0.7%
194Insert Interval
Medium
33
0.5%
195Remove Duplicates from Sorted Array II
Medium
33
0.6%
196Reverse Linked List II
Medium
33
0.5%
197Path Sum II
Medium
33
0.6%
198Valid Palindrome
Easy
33
0.5%
199Sort List
Medium
33
0.6%
200Reverse Words in a String
Medium
33
0.6%
201Maximum Product Subarray
Medium
33
0.4%
202Longest Substring with At Most Two Distinct Characters
Medium
33
0.6%
203Step-By-Step Directions From a Binary Tree Node to Another
Medium
33
0.6%
204Largest Number
Medium
33
0.4%
205Number of Islands II
Hard
33
0.4%
206Shortest Distance from All Buildings
Hard
33
0.4%
207Non-overlapping Intervals
Medium
33
0.6%
208String Compression
Medium
33
0.6%
209LFU Cache
Hard
33
0.5%
210Coin Change II
Medium
33
0.6%
211Contiguous Array
Medium
33
0.5%
212Count Pairs Of Similar Strings
Easy
33
0.7%
213Task Scheduler
Medium
33
0.6%
214Find K Closest Elements
Medium
33
0.5%
215Maximum Width of Binary Tree
Medium
33
0.5%
216Valid Palindrome II
Easy
33
0.4%
217Number of Atoms
Hard
33
0.7%
218Is Graph Bipartite?
Medium
33
0.6%
219Champagne Tower
Medium
33
0.6%
220Sum of Subarray Minimums
Medium
33
0.4%
221Minimum Increment to Make Array Unique
Medium
33
0.6%
222Pairs of Songs With Total Durations Divisible by 60
Medium
33
0.5%
223Search Suggestions System
Medium
33
0.7%
224Minimum Difficulty of a Job Schedule
Hard
33
0.6%
225Furthest Building You Can Reach
Medium
33
0.5%
226Remove Nth Node From End of List
Medium
33
0.5%
227Concatenated Words
Hard
33
0.5%
228My Calendar I
Medium
33
0.6%
229Number of Connected Components in an Undirected Graph
Medium
33
0.7%
230Permutation in String
Medium
33
0.5%
231Replace Words
Medium
33
0.7%
232Candy
Hard
33
0.5%
233Delete and Earn
Medium
33
0.6%
234Max Stack
Hard
33
0.5%
235House Robber III
Medium
33
0.6%
236Time Based Key-Value Store
Medium
33
0.5%
237Diameter of Binary Tree
Easy
33
0.7%
238Maximum Width Ramp
Medium
33
0.6%
239Find the Duplicate Number
Medium
33
0.6%
240All Nodes Distance K in Binary Tree
Medium
33
0.7%
241Best Time to Buy and Sell Stock with Cooldown
Medium
33
0.6%
242Letter Case Permutation
Medium
33
0.8%
243Minimum Number of Arrows to Burst Balloons
Medium
33
0.6%
244Add Bold Tag in String
Medium
33
0.5%
245Longest Duplicate Substring
Hard
33
0.3%
246Roman to Integer
Easy
33
0.7%
247Deepest Leaves Sum
Medium
33
0.9%
248Count Number of Nice Subarrays
Medium
33
0.8%
249Flatten Deeply Nested ArrayMedium
33
0.7%
250Merge In Between Linked Lists
Medium
33
0.8%
251Accounts Merge
Medium
33
0.6%
252Find All Anagrams in a String
Medium
33
0.5%
253Product of the Last K Numbers
Medium
33
0.6%
254Fruit Into Baskets
Medium
33
0.5%
255Rotate Image
Medium
33
0.8%
256Serialize and Deserialize N-ary Tree
Hard
33
0.7%
257Add Two Numbers
Medium
24
0.5%
258Median of Two Sorted Arrays
Hard
24
0.5%
259Valid Sudoku
Medium
24
0.6%
260Pow(x, n)
Medium
24
0.4%
261Spiral Matrix II
Medium
24
0.8%
262Unique Paths
Medium
24
0.7%
263Plus One
Easy
24
0.5%
264Decode Ways
Medium
24
0.4%
265Unique Binary Search Trees
Medium
24
0.6%
266Path Sum
Easy
24
0.6%
267Parallel Courses III
Hard
24
0.7%
268Happy Number
Easy
24
0.6%
269Implement Trie (Prefix Tree)
Medium
24
0.7%
270Search a 2D Matrix II
Medium
24
0.6%
2713Sum Smaller
Medium
24
0.5%
272Graph Valid Tree
Medium
24
0.5%
273Expression Add Operators
Hard
24
0.4%
274Rearrange String k Distance Apart
Hard
24
0.4%
275Add Two Numbers II
Medium
24
0.6%
276132 Pattern
Medium
24
0.3%
277Validate IP Address
Medium
24
0.3%
278Diagonal Traverse
Medium
24
0.7%
279Number of Longest Increasing Subsequence
Medium
24
0.5%
280Subarrays with K Different Integers
Hard
24
0.7%
281Cousins in Binary Tree
Easy
24
0.6%
282Dot Product of Two Sparse Vectors
Medium
24
0.9%
283Minimum Swaps to Group All 1's Together II
Medium
24
0.7%
284Valid Word Abbreviation
Easy
24
0.4%
285Combination Sum IV
Medium
24
0.6%
286Process Tasks Using Servers
Medium
24
0.4%
287Maximal Score After Applying K Operations
Medium
24
0.6%
288Find the Celebrity
Medium
24
0.5%
289Insert into a Sorted Circular Linked List
Medium
24
0.4%
290Minimum Number of Operations to Move All Balls to Each Box
Medium
24
0.9%
291Copy List with Random Pointer
Medium
24
0.6%
292The Maze II
Medium
24
0.6%
293Top K Frequent Words
Medium
24
0.6%
294Valid Palindrome III
Hard
24
0.5%
295Arithmetic Slices
Medium
24
0.6%
296Find Positive Integer Solution for a Given Equation
Medium
24
0.7%
297Maximum Spending After Buying Items
Hard
24
0.6%
298K-th Smallest in Lexicographical Order
Hard
24
0.5%
299Rearranging Fruits
Hard
24
0.6%
300Parallel Courses
Medium
24
0.6%
301Convert Sorted Array to Binary Search Tree
Easy
24
0.8%
302Maximum Performance of a Team
Hard
24
0.5%
303Two Sum II - Input Array Is Sorted
Medium
24
0.7%
304Maximum Profit in Job Scheduling
Hard
24
0.5%
305Kth Smallest Element in a BST
Medium
24
0.8%
306Construct String from Binary Tree
Medium
24
0.7%
307Add Two Integers
Easy
24
0.9%
308Put Marbles in Bags
Hard
24
0.7%
309Remove Duplicates from Sorted List II
Medium
24
0.5%
310Valid Mountain Array
Easy
24
0.4%
311Human Traffic of Stadium
Hard
24
0.5%
312Sparse Matrix Multiplication
Medium
24
0.7%
313Event EmitterMedium
24
0.8%
314Minesweeper
Medium
24
0.7%
315Valid Square
Medium
24
0.5%
316Symmetric Tree
Easy
24
0.6%
317Find Maximum Non-decreasing Array Length
Hard
24
0.2%
318Range Frequency Queries
Medium
24
0.4%
319Candy Crush
Medium
24
0.8%
320Shortest Subarray to be Removed to Make Array Sorted
Medium
24
0.5%
321Count the Number of Good Subarrays
Medium
24
0.7%
322Consecutive Numbers Sum
Hard
24
0.4%
323Recover Binary Search Tree
Medium
24
0.6%
324Wiggle Sort
Medium
24
0.7%
325Implement Queue using Stacks
Easy
24
0.7%
326Next Greater Element I
Easy
24
0.8%
327Encode and Decode Strings
Medium
24
0.5%
328Verify Preorder Sequence in Binary Search Tree
Medium
24
0.5%
329Number of Adjacent Elements With the Same Color
Medium
24
0.6%
33024 Game
Hard
24
0.6%
331Count Binary Substrings
Easy
24
0.7%
332Maximum Size Subarray Sum Equals k
Medium
24
0.5%
333Employee Free Time
Hard
24
0.7%
334Minimum Operations to Make the Array Increasing
Easy
24
0.8%
335Nth Digit
Medium
24
0.4%
336Valid Tic-Tac-Toe State
Medium
24
0.3%
337Robot Bounded In Circle
Medium
24
0.6%
338Word Pattern II
Medium
24
0.5%
339Partition to K Equal Sum Subsets
Medium
24
0.4%
340Minimum Absolute Difference Between Elements With Constraint
Medium
24
0.4%
341Department Top Three Salaries
Hard
24
0.6%
342Construct Binary Tree from Inorder and Postorder Traversal
Medium
24
0.7%
343Implement Rand10() Using Rand7()
Medium
24
0.5%
344Flip Game II
Medium
24
0.5%
345Lowest Common Ancestor of a Binary Tree IV
Medium
24
0.8%
346Surrounded Regions
Medium
24
0.5%
347Next Greater Element II
Medium
24
0.7%
348All O`one Data Structure
Hard
24
0.4%
349Unit Conversion II
Medium
24
0.7%
350Maximum Number of Events That Can Be Attended
Medium
24
0.4%
351Maximum Sum Circular Subarray
Medium
24
0.5%

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.

Similar companies