LeetCode Problems for Amazon

LeetCode Problems for Amazon

The biggest e-commerce platform Amazon always looks for talented people from the crowd. In this article, we’ve listed the popular LeetCode problems for Amazon interviews. Practice these problems to polish your programming skills and stand from the crowd. You can also view LeetCode problems for Google, Apple, Facebook

IDTitleAcceptanceDifficultyFrequency
937Reorder Data in Log Files54.3%Easy5.669086
200Number of Islands46.8%Medium5.561995
1192Critical Connections in a Network48.6%Hard5.451163
1Two Sum45.6%Easy5.340332
146LRU Cache33.2%Medium5.266473
973K Closest Points to Origin63.8%Medium5.155641
819Most Common Word44.8%Easy5.044810
138Copy List with Random Pointer36.4%Medium5.028653
5Longest Palindromic Substring29.5%Medium4.917821
994Rotting Oranges49.2%Medium4.806990
42Trapping Rain Water48.9%Hard4.697248
23Merge k Sorted Lists40.2%Hard4.599324
763Partition Labels76.1%Medium4.548324
2Add Two Numbers33.9%Medium4.437493
20Valid Parentheses39.0%Easy4.362623
21Merge Two Sorted Lists53.5%Easy4.322317
127Word Ladder29.6%Medium4.310600
295Find Median from Data Stream44.3%Hard4.291988
297Serialize and Deserialize Binary Tree47.5%Hard4.291093
692Top K Frequent Words51.8%Medium4.255293
572Subtree of Another Tree44.1%Easy4.159077
240Search a 2D Matrix II43.2%Medium4.048245
126Word Ladder II22.1%Hard4.024013
472Concatenated Words43.7%Hard3.921598
642Design Search Autocomplete System44.7%Hard3.866784
957Prison Cells After N Days40.7%Medium3.849230
121Best Time to Buy and Sell Stock50.5%Easy3.815410
273Integer to English Words27.1%Hard3.751742
4Median of Two Sorted Arrays29.6%Hard3.729457
3Longest Substring Without Repeating Characters30.4%Medium3.673122
253Meeting Rooms II45.7%Medium3.650908
17Letter Combinations of a Phone Number46.8%Medium3.646488
348Design Tic-Tac-Toe54.3%Medium3.644912
139Word Break40.1%Medium3.568929
155Min Stack44.5%Easy3.543506
48Rotate Image56.7%Medium3.541458
236Lowest Common Ancestor of a Binary Tree45.7%Medium3.524778
238Product of Array Except Self60.1%Medium3.514882
212Word Search II34.9%Hard3.483790
12Integer to Roman55.1%Medium3.460984
239Sliding Window Maximum43.0%Hard3.433795
269Alien Dictionary33.3%Hard3.377668
460LFU Cache34.2%Hard3.377651
153Sum26.8%Medium3.371084
33Search in Rotated Sorted Array34.5%Medium3.366648
675Cut Off Trees for Golf Event34.6%Hard3.362255
588Design In-Memory File System45.9%Hard3.360532
909Snakes and Ladders38.4%Medium3.343741
165Compare Version Numbers27.4%Medium3.275920
56Merge Intervals39.3%Medium3.274551
380Insert Delete GetRandom O(1)47.5%Medium3.264575
53Maximum Subarray46.5%Easy3.251839
49Group Anagrams56.9%Medium3.246429
545Boundary of Binary Tree38.9%Medium3.237053
11Container With Most Water50.8%Medium3.177583
76Minimum Window Substring34.6%Hard3.173047
54Spiral Matrix34.1%Medium3.113302
1152Analyze User Website Visit Pattern43.5%Medium3.092908
45Jump Game II30.6%Hard3.079200
206Reverse Linked List62.5%Easy3.067105
1167Minimum Cost to Connect Sticks62.8%Medium3.060176
277Find the Celebrity41.8%Medium2.949345
124Binary Tree Maximum Path Sum34.3%Hard2.928933
322Coin Change35.5%Medium2.922588
863All Nodes Distance K in Binary Tree55.4%Medium2.858443
694Number of Distinct Islands56.0%Medium2.841025
103Binary Tree Zigzag Level Order Traversal48.3%Medium2.828681
733Flood Fill55.3%Easy2.799884
25Reverse Nodes in k-Group42.1%Hard2.761379
341Flatten Nested List Iterator52.9%Medium2.754450
98Validate Binary Search Tree27.8%Medium2.737334
490The Maze51.4%Medium2.668429
208Implement Trie (Prefix Tree)49.4%Medium2.653827
535Encode and Decode TinyURL79.9%Medium2.648278
1268Search Suggestions System63.2%Medium2.619138
224Basic Calculator36.8%Hard2.618647
99Recover Binary Search Tree39.7%Hard2.592791
289Game of Life54.5%Medium2.585636
438Find All Anagrams in a String43.3%Medium2.572235
116Populating Next Right Pointers in Each Node45.2%Medium2.570963
22Generate Parentheses62.7%Medium2.568523
218The Skyline Problem34.6%Hard2.559475
772Basic Calculator III41.3%Hard2.558138
314Binary Tree Vertical Order Traversal45.3%Medium2.550800
387First Unique Character in a String53.4%Easy2.547997
105Construct Binary Tree from Preorder and Inorder Traversal48.8%Medium2.540402
215Kth Largest Element in an Array55.4%Medium2.534797
102Binary Tree Level Order Traversal54.6%Medium2.520333
207Course Schedule43.1%Medium2.503721
91Decode Ways24.7%Medium2.490602
140Word Break II32.6%Hard2.479095
64Minimum Path Sum54.5%Medium2.471655
84Largest Rectangle in Histogram35.2%Hard2.446723
866Prime Palindrome24.9%Medium2.426668
13Roman to Integer55.7%Easy2.416073
227Basic Calculator II36.9%Medium2.410014
117Populating Next Right Pointers in Each Node II39.1%Medium2.395027
505The Maze II47.7%Medium2.377524
449Serialize and Deserialize BST52.0%Medium2.355719
55Jump Game34.6%Medium2.354033
695Max Area of Island62.7%Medium2.332859
362Design Hit Counter63.7%Medium2.330220
235Lowest Common Ancestor of a Binary Search Tree49.9%Easy2.328202
93Restore IP Addresses35.6%Medium2.324986
1000Minimum Cost to Merge Stones39.8%Hard2.285269
74Search a 2D Matrix36.5%Medium2.275279
8String to Integer (atoi)15.4%Medium2.240034
1102Path With Maximum Minimum Value49.2%Medium2.236364
221Maximal Square37.7%Medium2.235984
543Diameter of Binary Tree48.4%Easy2.230047
101Symmetric Tree46.8%Easy2.218229
711Number of Distinct Islands II47.3%Hard2.197224
173Binary Search Tree Iterator56.6%Medium2.189474
445Add Two Numbers II54.5%Medium2.169549
143Reorder List37.1%Medium2.148764
31Next Permutation32.6%Medium2.148424
134Gas Station38.5%Medium2.142566
234Palindrome Linked List39.3%Easy2.134538
199Binary Tree Right Side View54.1%Medium2.126523
72Edit Distance44.8%Hard2.121008
149Max Points on a Line16.9%Hard2.112687
79Word Search35.6%Medium2.111131
347Top K Frequent Elements61.2%Medium2.101870
62Unique Paths54.1%Medium2.085041
631Design Excel Sum Formula31.6%Hard2.073991
394Decode String50.0%Medium2.066390
353Design Snake Game34.2%Medium2.064312
384Shuffle an Array52.8%Medium2.051144
323Number of Connected Components in an Undirected Graph56.0%Medium2.042069
133Clone Graph34.8%Medium2.032877
706Design HashMap61.3%Easy1.999279
336Palindrome Pairs33.7%Hard1.994773
682Baseball Game63.7%Easy1.969876
759Employee Free Time66.2%Hard1.949816
281Zigzag Iterator58.4%Medium1.942419
1091Shortest Path in Binary Matrix38.2%Medium1.925726
1120Maximum Average Subtree61.9%Medium1.918033
185Department Top Three Salaries34.5%Hard1.908524
150Evaluate Reverse Polish Notation36.3%Medium1.901204
10Regular Expression Matching26.8%Hard1.895297
564Find the Closest Palindrome19.7%Hard1.889193
71Simplify Path32.6%Medium1.888682
1099Two Sum Less Than K60.6%Easy1.884409
96Unique Binary Search Trees52.9%Medium1.883023
417Pacific Atlantic Water Flow41.1%Medium1.876850
1279Traffic Light Controlled Intersection74.3%Easy1.872666
122Best Time to Buy and Sell Stock II57.0%Easy1.852594
895Maximum Frequency Stack60.6%Hard1.849081
97Interleaving String31.5%Hard1.839712
286Walls and Gates54.5%Medium1.839120
640Solve the Equation42.0%Medium1.833456
39Combination Sum56.1%Medium1.817926
59Spiral Matrix II53.9%Medium1.817619
317Shortest Distance from All Buildings41.4%Hard1.810917
529Minesweeper59.1%Medium1.789872
169Majority Element58.7%Easy1.788905
152Maximum Product Subarray31.7%Medium1.771346
503Next Greater Element II56.5%Medium1.770513
210Course Schedule II40.7%Medium1.770235
167Two Sum II – Input array is sorted54.1%Easy1.758895
78Subsets62.0%Medium1.755791
312Burst Balloons51.8%Hard1.742629
88Merge Sorted Array39.4%Easy1.741132
315Count of Smaller Numbers After Self41.5%Hard1.737615
211Add and Search Word – Data structure design38.1%Medium1.727663
252Meeting Rooms54.6%Easy1.727286
92Reverse Linked List II38.8%Medium1.726801
1155Number of Dice Rolls With Target Sum49.0%Medium1.720070
160Intersection of Two Linked Lists40.6%Easy1.717519
538Convert BST to Greater Tree55.4%Easy1.715436
36Valid Sudoku48.7%Medium1.714321
261Graph Valid Tree42.2%Medium1.712055
41First Missing Positive32.0%Hard1.707798
75Sort Colors47.3%Medium1.705566
332Reconstruct Itinerary36.7%Medium1.702479
388Longest Absolute File Path41.8%Medium1.701920
980Unique Paths III73.3%Hard1.694595
32Longest Valid Parentheses28.4%Hard1.691977
128Longest Consecutive Sequence45.1%Hard1.686584
653Two Sum IV – Input is a BST55.5%Easy1.684088
153Find Minimum in Rotated Sorted Array45.1%Medium1.677087
46Permutations63.5%Medium1.672714
57Insert Interval33.5%Hard1.663668
560Subarray Sum Equals K43.9%Medium1.659253
228Summary Ranges39.5%Medium1.656737
19Remove Nth Node From End of List35.2%Medium1.652142
815Bus Routes42.5%Hard1.652011
109Convert Sorted List to Binary Search Tree47.7%Medium1.649357
177Nth Highest Salary31.4%Medium1.645549
489Robot Room Cleaner69.7%Hard1.632432
268Missing Number51.7%Easy1.632076
767Reorganize String48.7%Medium1.629188
123Best Time to Buy and Sell Stock III37.5%Hard1.626950
496Next Greater Element I63.8%Easy1.623294
179Largest Number28.8%Medium1.616394
739Daily Temperatures63.3%Medium1.616070
135Candy31.6%Hard1.608531
333Largest BST Subtree35.8%Medium1.608189
716Max Stack42.6%Easy1.596707
983Minimum Cost For Tickets60.5%Medium1.590012
284Peeking Iterator45.7%Medium1.573409
703Kth Largest Element in a Stream49.7%Easy1.570771
403Frog Jump39.7%Hard1.564860
987Vertical Order Traversal of a Binary Tree36.6%Medium1.564572
1135Connecting Cities With Minimum Cost57.5%Medium1.558144
24Swap Nodes in Pairs50.4%Medium1.557364
437Path Sum III47.2%Medium1.555411
300Longest Increasing Subsequence42.6%Medium1.549004
85Maximal Rectangle37.7%Hard1.537804
456132 Pattern28.9%Medium1.525732
141Linked List Cycle41.1%Easy1.522542
113Path Sum II46.7%Medium1.515051
285Inorder Successor in BST40.4%Medium1.510518
373Find K Pairs with Smallest Sums36.7%Medium1.508429
188Best Time to Buy and Sell Stock IV28.0%Hard1.504354
346Moving Average from Data Stream70.9%Easy1.502690
163Sum Closest46.0%Medium1.502292
70Climbing Stairs47.8%Easy1.499205
51N-Queens46.6%Hard1.498552
556Next Greater Element III31.7%Medium1.495390
148Sort List42.3%Medium1.493062
287Find the Duplicate Number55.5%Medium1.492409
518Coin Change 250.2%Medium1.488869
176Second Highest Salary31.6%Easy1.488495
120Triangle44.2%Medium1.484114
184Sum33.7%Medium1.478249
270Closest Binary Search Tree Value48.5%Easy1.478223
378Kth Smallest Element in a Sorted Matrix54.3%Medium1.477526
540Single Element in a Sorted Array57.9%Medium1.453572
205Isomorphic Strings39.8%Easy1.425780
63Unique Paths II34.6%Medium1.425285
1044Longest Duplicate Substring31.9%Hard1.423379
73Set Matrix Zeroes43.1%Medium1.412093
480Sliding Window Median37.2%Hard1.410024
68Text Justification27.7%Hard1.408642
232Implement Queue using Stacks49.6%Easy1.405609
628Maximum Product of Three Numbers47.1%Easy1.395625
442Find All Duplicates in an Array67.8%Medium1.387907
229Majority Element II35.6%Medium1.387856
14Longest Common Prefix35.4%Easy1.384609
787Cheapest Flights Within K Stops39.3%Medium1.378544
340Longest Substring with At Most K Distinct Characters44.1%Hard1.376802
325Maximum Size Subarray Sum Equals k46.8%Medium1.371822
44Wildcard Matching24.7%Hard1.361233
770Basic Calculator IV48.1%Hard1.349926
136Single Number65.5%Easy1.348462
298Binary Tree Longest Consecutive Sequence47.1%Medium1.346804
329Longest Increasing Path in a Matrix43.4%Hard1.344540
943Find the Shortest Superstring42.9%Hard1.344077
636Exclusive Time of Functions52.0%Medium1.337457
369Plus One Linked List58.2%Medium1.337363
836Rectangle Overlap48.6%Easy1.309376
104Maximum Depth of Binary Tree66.0%Easy1.303689
28Implement strStr()34.5%Easy1.300431
652Find Duplicate Subtrees50.2%Medium1.294755
6ZigZag Conversion36.3%Medium1.294591
399Evaluate Division51.6%Medium1.277612
516Longest Palindromic Subsequence53.2%Medium1.264778
678Valid Parenthesis String31.0%Medium1.262155
30Substring with Concatenation of All Words25.4%Hard1.257695
242Valid Anagram56.9%Easy1.252391
349Intersection of Two Arrays62.5%Easy1.250030
688Knight Probability in Chessboard48.9%Medium1.249979
981Time Based Key-Value Store53.1%Medium1.247523
344Reverse String68.5%Easy1.246073
1011Capacity To Ship Packages Within D Days58.1%Medium1.245643
301Remove Invalid Parentheses43.3%Hard1.242036
29Divide Two Integers16.4%Medium1.239324
112Path Sum41.2%Easy1.229277
1038Binary Search Tree to Greater Sum Tree80.8%Medium1.201779
1100Find K-Length Substrings With No Repeated Characters72.7%Medium1.184336
50Pow(x;n)30.3%Medium1.176892
997Find the Town Judge50.1%Easy1.174873
37Sudoku Solver43.6%Hard1.170704
805Split Array With Same Average26.4%Hard1.168509
225Implement Stack using Queues45.1%Easy1.160739
854K-Similar Strings38.2%Hard1.159451
230Kth Smallest Element in a BST60.2%Medium1.155444
721Accounts Merge48.8%Medium1.132047
622Design Circular Queue43.7%Medium1.115132
409Longest Palindrome50.3%Easy1.111534
54201 Matrix39.8%Medium1.098310
726Number of Atoms49.0%Hard1.095317
426Convert Binary Search Tree to Sorted Doubly Linked List59.1%Medium1.093698
352Data Stream as Disjoint Intervals47.3%Hard1.088832
794Valid Tic-Tac-Toe State32.6%Medium1.084013
430Flatten a Multilevel Doubly Linked List55.1%Medium1.075910
257Binary Tree Paths51.5%Easy1.070178
130Surrounded Regions28.1%Medium1.058078
283Move Zeroes57.8%Easy1.057417
94Binary Tree Inorder Traversal63.3%Medium1.049418
131Palindrome Partitioning47.5%Medium1.047877
81Search in Rotated Sorted Array II33.0%Medium1.042801
187Repeated DNA Sequences38.9%Medium1.029105
266Palindrome Permutation61.9%Easy1.027494
7Reverse Integer25.8%Easy1.026156
381Insert Delete GetRandom O(1) – Duplicates allowed34.1%Hard1.026132
498Diagonal Traverse48.2%Medium1.025668
1219Path with Maximum Gold65.1%Medium1.020055
547Friend Circles58.6%Medium1.019483
86Partition List41.5%Medium1.013118
1032Stream of Characters48.3%Hard0.999974
508Most Frequent Subtree Sum57.9%Medium0.993295
226Invert Binary Tree65.0%Easy0.990106
279Perfect Squares47.4%Medium0.988611
181Employees Earning More Than Their Managers56.9%Easy0.985579
114Flatten Binary Tree to Linked List49.3%Medium0.979314
647Palindromic Substrings60.6%Medium0.968336
412Fizz Buzz62.3%Easy0.962457
108Convert Sorted Array to Binary Search Tree57.9%Easy0.959189
1236Web Crawler64.3%Medium0.955511
1214Two Sum BSTs67.6%Medium0.954006
993Cousins in Binary Tree52.0%Easy0.949887
635Design Log Storage System58.6%Medium0.944810
186Reverse Words in a String II43.3%Medium0.944461
61Rotate List30.0%Medium0.939461
1010Pairs of Songs With Total Durations Divisible by 6047.4%Easy0.930911
34Find First and Last Position of Element in Sorted Array36.2%Medium0.930848
175Combine Two Tables60.8%Easy0.922030
272Closest Binary Search Tree Value II50.5%Hard0.918640
847Shortest Path Visiting All Nodes52.0%Hard0.916290
243Shortest Word Distance61.0%Easy0.915666
204Count Primes31.5%Easy0.913163
142Linked List Cycle II37.3%Medium0.909052
69Sqrt(x)33.9%Easy0.907557
419Battleships in a Board70.0%Medium0.906605
9Palindrome Number48.4%Easy0.905261
166Fraction to Recurring Decimal21.6%Medium0.904516
1046Last Stone Weight62.2%Easy0.903681
463Island Perimeter65.7%Easy0.897758
406Queue Reconstruction by Height66.9%Medium0.896215
978Longest Turbulent Subarray46.6%Medium0.895013
162Find Peak Element43.3%Medium0.889268
366Find Leaves of Binary Tree70.6%Medium0.883955
690Employee Importance57.3%Easy0.861251
698Partition to K Equal Sum Subsets45.0%Medium0.860611
528Random Pick with Weight43.9%Medium0.853787
38Count and Say44.6%Easy0.845162
986Interval List Intersections67.3%Medium0.844800
699Falling Squares41.8%Hard0.842564
708Insert into a Sorted Circular Linked List31.6%Medium0.841248
316Remove Duplicate Letters35.8%Hard0.835526
110Balanced Binary Tree43.5%Easy0.826480
1024Video Stitching49.2%Medium0.825299
428Serialize and Deserialize N-ary Tree59.4%Hard0.824896
443String Compression41.3%Easy0.817135
402Remove K Digits28.4%Medium0.801437
361Bomb Enemy46.0%Medium0.797659
233Number of Digit One31.3%Hard0.795650
658Find K Closest Elements40.9%Medium0.793091
451Sort Characters By Frequency63.0%Medium0.786167
351Android Unlock Patterns48.4%Medium0.785739
350Intersection of Two Arrays II51.4%Easy0.777210
632Smallest Range Covering Elements from K Lists52.4%Hard0.776712
159Longest Substring with At Most Two Distinct Characters49.4%Medium0.771917
843Guess the Word46.1%Hard0.771399
421Maximum XOR of Two Numbers in an Array53.5%Medium0.768784
198House Robber42.0%Easy0.766834
432All O`one Data Structure32.4%Hard0.761188
992Subarrays with K Different Integers48.6%Hard0.761008
785Is Graph Bipartite?47.5%Medium0.756095
280Wiggle Sort63.8%Medium0.748973
337House Robber III50.6%Medium0.746301
807Max Increase to Keep City Skyline83.7%Medium0.746046
465Optimal Account Balancing46.9%Hard0.744835
410Split Array Largest Sum44.5%Hard0.744113
189Rotate Array34.7%Easy0.741620
125Valid Palindrome36.7%Easy0.735176
1197Minimum Knight Moves36.1%Medium0.734842
662Maximum Width of Binary Tree41.0%Medium0.734717
1083Sales Analysis II50.5%Easy0.733766
83Remove Duplicates from Sorted List45.4%Easy0.730981
40Combination Sum II48.2%Medium0.723247
1215Stepping Numbers41.6%Medium0.722134
735Asteroid Collision41.0%Medium0.721526
82Remove Duplicates from Sorted List II36.8%Medium0.721463
310Minimum Height Trees32.3%Medium0.716101
737Sentence Similarity II45.8%Medium0.714200
129Sum Root to Leaf Numbers49.1%Medium0.712195
171Excel Sheet Column Number55.9%Easy0.701136
328Odd Even Linked List55.7%Medium0.700505
617Merge Two Binary Trees74.1%Easy0.695115
1429First Unique Number47.0%Medium0.689006
1086High Five79.7%Easy0.684580
231Power of Two43.7%Easy0.682325
525Contiguous Array42.8%Medium0.681861
65Valid Number15.3%Hard0.681519
151Reverse Words in a String21.9%Medium0.673804
164Maximum Gap35.5%Hard0.669776
356Line Reflection31.8%Medium0.666159
509Fibonacci Number67.2%Easy0.664818
161One Edit Distance32.3%Medium0.654074
901Online Stock Span60.2%Medium0.652873
202Happy Number50.4%Easy0.644604
1229Meeting Scheduler52.7%Medium0.631447
517Super Washing Machines38.3%Hard0.625705
1275Find Winner on a Tic Tac Toe Game52.8%Easy0.625705
1022Sum of Root To Leaf Binary Numbers67.2%Easy0.617723
90Subsets II47.1%Medium0.603916
775Global and Local Inversions42.1%Medium0.603059
26Remove Duplicates from Sorted Array45.1%Easy0.599298
433Minimum Genetic Mutation41.8%Medium0.597837
137Single Number II52.4%Medium0.591561
184Department Highest Salary36.7%Medium0.587261
1004Max Consecutive Ones III59.1%Medium0.582678
407Trapping Rain Water II42.4%Hard0.580113
377Combination Sum IV45.3%Medium0.565026
106Construct Binary Tree from Inorder and Postorder Traversal47.2%Medium0.564849
1166Design File System56.8%Medium0.563210
634Find the Derangement of An Array40.1%Medium0.562307
725Split Linked List in Parts52.2%Medium0.561800
729My Calendar I51.8%Medium0.560410
132Palindrome Partitioning II30.2%Hard0.558643
929Unique Email Addresses67.4%Easy0.558198
250Count Univalue Subtrees52.0%Medium0.558033
118Pascal’s Triangle52.5%Easy0.557727
217Contains Duplicate56.0%Easy0.557221
60Permutation Sequence38.4%Hard0.556508
296Best Meeting Point57.5%Hard0.554941
66Plus One43.0%Easy0.551107
355Design Twitter30.3%Medium0.550795
715Range Module38.5%Hard0.537142
765Couples Holding Hands54.3%Hard0.535710
611Valid Triangle Number48.4%Medium0.528067
299Bulls and Cows42.4%Easy0.525442
415Add Strings47.5%Easy0.523163
209Minimum Size Subarray Sum38.2%Medium0.521415
557Reverse Words in a String III69.8%Easy0.517303
719Find K-th Smallest Pair Distance31.5%Hard0.516327
335Self Crossing28.0%Hard0.514181
393UTF-8 Validation37.5%Medium0.514046
192Word Frequency25.8%Medium0.512968
1057Campus Bikes57.7%Medium0.508613
701Insert into a Binary Search Tree77.7%Medium0.507378
771Jewels and Stones86.4%Easy0.506722
686Repeated String Match32.3%Easy0.501021
541Reverse String II48.4%Easy0.495822
637Average of Levels in Binary Tree63.1%Easy0.495217
163Missing Ranges24.3%Medium0.491822
743Network Delay Time45.0%Medium0.487601
365Water and Jug Problem30.6%Medium0.486847
319Bulb Switcher45.4%Medium0.478490
395Longest Substring with At Least K Repeating Characters41.4%Medium0.478170
339Nested List Weight Sum74.0%Easy0.475342
1031Maximum Sum of Two Non-Overlapping Subarrays57.9%Medium0.473070
1122Relative Sort Array67.7%Easy0.470873
89Gray Code49.1%Medium0.470590
111Minimum Depth of Binary Tree37.4%Easy0.469671
371Sum of Two Integers50.7%Medium0.469029
558Logical OR of Two Binary Grids Represented as Quad-Trees44.6%Medium0.468136
844Backspace String Compare46.4%Easy0.467418
354Russian Doll Envelopes35.6%Hard0.466399
773Sliding Puzzle59.3%Hard0.463961
1161Maximum Level Sum of a Binary Tree72.2%Medium0.462841
413Arithmetic Slices57.9%Medium0.459949
515Find Largest Value in Each Tree Row61.1%Medium0.459405
427Construct Quad Tree61.4%Medium0.458574
450Delete Node in a BST43.1%Medium0.448492
100Same Tree53.4%Easy0.446989
468Validate IP Address24.1%Medium0.445585
305Number of Islands II40.1%Hard0.442937
1002Find Common Characters67.6%Easy0.440870
1172Dinner Plate Stacks38.2%Hard0.440596
1360Number of Days Between Two Dates48.8%Easy0.440596
1019Next Greater Node In Linked List57.4%Medium0.435574
473Matchsticks to Square37.7%Medium0.428001
727Minimum Window Subsequence41.8%Hard0.425465
183Customers Who Never Order53.4%Easy0.423609
1130Minimum Cost Tree From Leaf Values66.1%Medium0.422007
683K Empty Slots35.6%Hard0.419481
43Multiply Strings33.9%Medium0.416580
849Maximize Distance to Closest Person42.6%Easy0.414728
178Rank Scores45.8%Medium0.413473
222Count Complete Tree Nodes46.8%Medium0.410861
304Range Sum Query 2D – Immutable38.6%Medium0.408379
1094Car Pooling56.7%Medium0.406830
1066Campus Bikes II54.2%Medium0.400323
416Partition Equal Subset Sum43.7%Medium0.399266
1335Minimum Difficulty of a Job Schedule57.6%Hard0.396304
241Different Ways to Add Parentheses55.2%Medium0.395191
145Binary Tree Postorder Traversal55.0%Hard0.393895
1373Maximum Sum BST in Binary Tree40.2%Hard0.393187
687Longest Univalue Path36.2%Easy0.393102
47Permutations II46.4%Medium0.389543
1188Design Bounded Blocking Queue70.5%Medium0.382859
237Delete Node in a Linked List63.8%Easy0.382200
1074Number of Submatrices That Sum to Target60.4%Hard0.379295
646Maximum Length of Pair Chain51.9%Medium0.378500
924Minimize Malware Spread42.0%Hard0.376477
321Create Maximum Number27.0%Hard0.376477
1084Sales Analysis III54.3%Easy0.376405
567Permutation in String44.4%Medium0.375399
307Range Sum Query – Mutable34.6%Medium0.375220
969Pancake Sorting67.5%Medium0.373513
889Construct Binary Tree from Preorder and Postorder Traversal66.2%Medium0.373121
115Distinct Subsequences38.3%Hard0.372268
1081Smallest Subsequence of Distinct Characters50.4%Medium0.366362
1143Longest Common Subsequence58.4%Medium0.361080
214Shortest Palindrome29.8%Hard0.354934
345Reverse Vowels of a String44.2%Easy0.354073
783Minimum Distance Between BST Nodes52.6%Easy0.353950
264Ugly Number II42.0%Medium0.350792
180Consecutive Numbers39.7%Medium0.346052
618Students Report By Geography55.0%Hard0.345604
107Binary Tree Level Order Traversal II53.5%Easy0.345316
905Sort Array By Parity74.1%Easy0.341971
860Lemonade Change51.6%Easy0.341443
581Shortest Unsorted Continuous Subarray31.1%Easy0.340971
334Increasing Triplet Subsequence40.0%Medium0.339819
390Elimination Game44.5%Medium0.337906
579Find Cumulative Salary of an Employee37.0%Hard0.337188
262Trips and Users32.7%Hard0.336239
1405Longest Happy String49.0%Medium0.336015
420Strong Password Checker14.0%Hard0.331962
827Making A Large Island45.7%Hard0.328795
1315Sum of Nodes with Even-Valued Grandparent83.5%Medium0.328115
1062Longest Repeating Substring57.2%Medium0.326091
447Number of Boomerangs51.8%Easy0.324756
532K-diff Pairs in an Array31.6%Easy0.324239
1311Get Watched Videos by Your Friends43.1%Medium0.320742
290Word Pattern37.0%Easy0.319213
876Middle of the Linked List68.4%Easy0.318488
710Random Pick with Blacklist32.5%Hard0.316197
918Maximum Sum Circular Subarray33.7%Medium0.315917
191Number of 1 Bits49.8%Easy0.313001
873Length of Longest Fibonacci Subsequence48.0%Medium0.311910
586Customer Placing the Largest Number of Orders73.0%Easy0.311518
383Ransom Note53.1%Easy0.307484
174Dungeon Game32.3%Hard0.305958
657Robot Return to Origin73.5%Easy0.305730
841Keys and Rooms64.3%Medium0.297514
1244Design A Leaderboard60.7%Medium0.296819
938Range Sum of BST81.3%Easy0.296220
95Unique Binary Search Trees II40.6%Medium0.295829
203Remove Linked List Elements38.6%Easy0.293908
359Logger Rate Limiter70.8%Easy0.292987
919Complete Binary Tree Inserter57.3%Medium0.291434
796Rotate String49.6%Easy0.289220
559Maximum Depth of N-ary Tree68.7%Easy0.288026
158Read N Characters Given Read4 II – Call multiple times33.8%Hard0.281525
1104Path In Zigzag Labelled Binary Tree72.0%Medium0.280571
382Linked List Random Node52.1%Medium0.280215
732My Calendar III60.0%Hard0.279584
1007Minimum Domino Rotations For Equal Row50.0%Medium0.275493
244Shortest Word Distance II52.3%Medium0.275228
77Combinations54.7%Medium0.274411
414Third Maximum Number30.5%Easy0.273791
1108Defanging an IP Address87.5%Easy0.270750
1013Partition Array Into Three Parts With Equal Sum51.8%Easy0.263290
119Pascal’s Triangle II49.0%Easy0.261696
1139Largest 1-Bordered Square47.5%Medium0.261597
746Min Cost Climbing Stairs50.3%Easy0.261187
453Minimum Moves to Equal Array Elements50.2%Easy0.260531
466Count The Repetitions28.2%Hard0.256168
570Managers with at Least 5 Direct Reports66.0%Medium0.255346
609Find Duplicate File in System59.5%Medium0.253880
762Prime Number of Set Bits in Binary Representation63.2%Easy0.247793
368Largest Divisible Subset38.0%Medium0.244787
881Boats to Save People46.8%Medium0.243205
452Minimum Number of Arrows to Burst Balloons49.6%Medium0.238433
731My Calendar II49.1%Medium0.236388
1047Remove All Adjacent Duplicates In String68.6%Easy0.236008
779K-th Symbol in Grammar37.2%Medium0.235302
1270All People Report to the Given Manager87.1%Medium0.234993
507Perfect Number35.5%Easy0.234938
35Search Insert Position42.6%Easy0.232692
397Integer Replacement32.9%Medium0.232252
811Subdomain Visit Count69.9%Easy0.225530
311Sparse Matrix Multiplication61.9%Medium0.225388
939Minimum Area Rectangle51.8%Medium0.216922
435Non-overlapping Intervals42.9%Medium0.215649
669Trim a Binary Search Tree63.0%Easy0.212458
626Exchange Seats62.3%Medium0.210327
741Cherry Pickup33.9%Hard0.209091
862Shortest Subarray with Sum at Least K24.6%Hard0.208242
1249Minimum Remove to Make Valid Parentheses62.5%Medium0.207783
1202Smallest String With Swaps46.5%Medium0.207159
604Design Compressed String Iterator37.5%Easy0.205852
1008Construct Binary Search Tree from Preorder Traversal78.4%Medium0.205397
1254Number of Closed Islands60.5%Medium0.203124
1375Bulb Switcher III62.6%Medium0.196226
1060Missing Element in Sorted Array54.5%Medium0.195060
601Human Traffic of Stadium41.7%Hard0.194313
1198Find Smallest Common Element in All Rows74.9%Medium0.191055
756Pyramid Transition Matrix54.6%Medium0.191055
358Rearrange String k Distance Apart34.9%Hard0.190043
995Minimum Number of K Consecutive Bit Flips46.8%Hard0.190043
864Shortest Path to Get All Keys40.1%Hard0.189241
549Binary Tree Longest Consecutive Sequence II47.0%Medium0.188447
900RLE Iterator53.5%Medium0.188447
681Next Closest Time45.0%Medium0.188126
684Redundant Connection57.4%Medium0.187267
219Contains Duplicate II37.7%Easy0.186968
792Number of Matching Subsequences47.4%Medium0.185717
852Peak Index in a Mountain Array71.6%Easy0.184963
536Construct Binary Tree from String48.3%Medium0.181951
1153String Transforms Into Another String35.8%Hard0.181698
1245Tree Diameter60.1%Medium0.178691
871Minimum Number of Refueling Stops31.4%Hard0.176930
486Predict the Winner47.9%Medium0.176474
1027Longest Arithmetic Sequence53.4%Medium0.175890
977Squares of a Sorted Array72.1%Easy0.174821
523Continuous Subarray Sum24.6%Medium0.174115
670Maximum Swap43.6%Medium0.173594
1248Count Number of Nice Subarrays56.4%Medium0.172283
561Array Partition I72.0%Easy0.171809
856Score of Parentheses60.5%Medium0.171358
707Design Linked List24.5%Medium0.170432
1162As Far from Land as Possible43.5%Medium0.169358
1430Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree44.8%Medium0.169178
1026Maximum Difference Between Node and Ancestor66.0%Medium0.167834
963Minimum Area Rectangle II50.9%Medium0.166357
493Reverse Pairs25.2%Hard0.162298
1048Longest String Chain54.7%Medium0.162078
338Counting Bits69.5%Medium0.161355
720Longest Word in Dictionary48.2%Easy0.160827
404Sum of Left Leaves50.9%Easy0.159116
724Find Pivot Index44.0%Easy0.157730
539Minimum Time Difference51.5%Medium0.156025
979Distribute Coins in Binary Tree68.9%Medium0.153486
1242Web Crawler Multithreaded45.9%Medium0.149531
1395Count Number of Teams82.0%Medium0.149442
951Flip Equivalent Binary Trees65.8%Medium0.148375
942DI String Match72.6%Easy0.146379
213House Robber II36.5%Medium0.144966
714Best Time to Buy and Sell Stock with Transaction Fee54.7%Medium0.142773
376Wiggle Subsequence39.6%Medium0.139234
673Number of Longest Increasing Subsequence35.7%Medium0.138509
1005Maximize Sum Of Array After K Negations51.3%Easy0.138044
855Exam Room43.1%Medium0.138044
702Search in a Sorted Array of Unknown Size66.9%Medium0.137832
429N-ary Tree Level Order Traversal65.0%Medium0.137276
392Is Subsequence49.2%Easy0.136352
1479Sales by Day of the Week83.4%Hard0.134884
1160Find Words That Can Be Formed by Characters67.4%Easy0.133674
309Best Time to Buy and Sell Stock with Cooldown47.4%Medium0.130888
958Check Completeness of a Binary Tree52.1%Medium0.128844
974Subarray Sums Divisible by K48.9%Medium0.128381
1117Building H2O52.6%Medium0.127969
1059All Paths from Source Lead to Destination44.7%Medium0.126751
475Heaters33.1%Easy0.126395
1233Remove Sub-Folders from the Filesystem59.5%Medium0.124126
621Task Scheduler50.1%Medium0.123879
890Find and Replace Pattern73.4%Medium0.123613
912Sort an Array63.9%Medium0.122937
654Maximum Binary Tree79.9%Medium0.122342
1114Print in Order65.7%Easy0.121360
784Letter Case Permutation64.6%Medium0.120395
839Similar String Groups38.6%Hard0.119346
904Fruit Into Baskets42.5%Medium0.118848
1299Replace Elements with Greatest Element on Right Side75.4%Easy0.118067
1179Reformat Department Table80.6%Easy0.117350
144Binary Tree Preorder Traversal55.7%Medium0.116763
67924 Game46.4%Hard0.116410
67Add Binary45.2%Easy0.113490
671Second Minimum Node In a Binary Tree42.7%Easy0.113435
1068Product Sales Analysis I83.1%Easy0.112477
842Split Array into Fibonacci Sequence36.3%Medium0.111848
196Delete Duplicate Emails41.1%Easy0.111723
742Closest Leaf in a Binary Tree43.6%Medium0.110609
966Vowel Spellchecker47.2%Medium0.106767
249Group Shifted Strings55.1%Medium0.106129
172Factorial Trailing Zeroes37.8%Easy0.105825
1266Minimum Time Visiting All Points79.6%Easy0.103827
396Rotate Function36.3%Medium0.103451
267Palindrome Permutation II36.4%Medium0.103451
485Max Consecutive Ones54.6%Easy0.102478
27Remove Element48.2%Easy0.102241
1110Delete Nodes And Return Forest67.0%Medium0.099525
661Image Smoother51.5%Easy0.099337
1023Camelcase Matching57.0%Medium0.098601
461Hamming Distance72.8%Easy0.097628
752Open the Lock51.8%Medium0.094914
605Can Place Flowers31.6%Easy0.094857
826Most Profit Assigning Work38.5%Medium0.092874
367Valid Perfect Square41.7%Easy0.090216
791Custom Sort String65.7%Medium0.090049
216Combination Sum III56.6%Medium0.087535
1247Minimum Swaps to Make Strings Equal60.1%Medium0.086260
916Word Subsets47.8%Medium0.084796
582Kill Process60.8%Medium0.083555
921Minimum Add to Make Parentheses Valid73.7%Medium0.083078
459Repeated Substring Pattern42.2%Easy0.082992
278First Bad Version35.7%Easy0.082959
884Uncommon Words from Two Sentences63.3%Easy0.079900
875Koko Eating Bananas52.1%Medium0.079197
705Design HashSet64.3%Easy0.074972
674Longest Continuous Increasing Subsequence45.9%Easy0.073936
1082Sales Analysis I71.8%Easy0.071458
260Single Number III64.3%Medium0.070562
1146Snapshot Array37.0%Medium0.070176
953Verifying an Alien Dictionary54.1%Easy0.068821
814Binary Tree Pruning74.5%Medium0.068729
1337The K Weakest Rows in a Matrix68.8%Easy0.068572
1495Friendly Movies Streamed Last Month52.6%Easy0.068519
872Leaf-Similar Trees64.5%Easy0.068315
584Find Customer Referee72.3%Easy0.065921
1332Remove Palindromic Subsequences60.1%Easy0.065813
1029Two City Scheduling56.1%Easy0.063715
1251Average Selling Price81.6%Easy0.062228
801Minimum Swaps To Make Sequences Increasing38.9%Medium0.061463
1069Product Sales Analysis II82.9%Easy0.060809
931Minimum Falling Path Sum62.5%Medium0.059149
52N-Queens II57.9%Hard0.058155
80Remove Duplicates from Sorted Array II44.0%Medium0.057987
922Sort Array By Parity II69.3%Easy0.057671
1221Split a String in Balanced Strings83.3%Easy0.053626
1303Find the Team Size87.8%Easy0.051557
1339Maximum Product of Splitted Binary Tree37.2%Medium0.050643
1128Number of Equivalent Domino Pairs47.3%Easy0.049515
1267Count Servers that Communicate57.9%Medium0.049029
1051Height Checker71.1%Easy0.045103
1382Balance a Binary Search Tree74.8%Medium0.044800
1456Maximum Number of Vowels in a Substring of Given Length52.4%Medium0.042200
704Binary Search52.1%Easy0.041727
965Univalued Binary Tree67.7%Easy0.041518
590N-ary Tree Postorder Traversal72.1%Easy0.040454
1049Last Stone Weight II44.2%Medium0.039029
797All Paths From Source to Target77.9%Medium0.038811
1511Customer Order Frequency76.8%Easy0.038392
606Construct String from Binary Tree54.1%Easy0.037110
190Reverse Bits39.8%Easy0.036452
1304Find N Unique Integers Sum up to Zero76.3%Easy0.035408
1325Delete Leaves With a Given Value73.0%Medium0.034786
1344Angle Between Hands of a Clock61.4%Medium0.030822
501Find Mode in Binary Search Tree42.4%Easy0.029808
303Range Sum Query – Immutable44.7%Easy0.029549
665Non-decreasing Array19.5%Easy0.029053
1520Maximum Number of Non-Overlapping Substrings32.8%Hard0.021485
154Find Minimum in Rotated Sorted Array II41.6%Hard0.018984
389Find the Difference55.3%Easy0.016978
1365How Many Numbers Are Smaller Than the Current Number85.6%Easy0.015926
1351Count Negative Numbers in a Sorted Matrix76.5%Easy0.013016
1431Kids With the Greatest Number of Candies88.9%Easy0.005927
663Equal Tree Partition39.5%Medium0
537Complex Number Multiplication67.4%Medium0
553Optimal Division56.8%Medium0
645Set Mismatch42.1%Easy0
738Monotone Increasing Digits44.3%Medium0
776Split BST55.8%Medium0
851Loud and Rich51.6%Medium0
899Orderly Queue52.2%Hard0
902Numbers At Most N Given Digit Set31.5%Hard0
1067Digit Count in Range40.0%Hard0
1065Index Pairs of a String60.7%Easy0
1085Sum of Digits in the Minimum Number74.6%Easy0
1118Number of Days in a Month57.4%Easy0
1119Remove Vowels from a String89.9%Easy0
1134Armstrong Number78.2%Easy0
1028Recover a Tree From Preorder Traversal69.9%Hard0
1133Largest Unique Number66.8%Easy0
1035Uncrossed Lines56.1%Medium0
1045Customers Who Bought All Products67.7%Medium0
1050Actors and Directors Who Cooperated At Least Three Times71.7%Easy0
1054Distant Barcodes43.2%Medium0
1070Product Sales Analysis III48.9%Medium0
1080Insufficient Nodes in Root to Leaf Paths49.3%Medium0
1259Handshakes That Don’t Cross53.5%Hard0
1288Remove Covered Intervals57.9%Medium0
1129Shortest Path with Alternating Colors38.9%Medium0
1362Closest Divisors56.8%Medium0
1363Largest Multiple of Three33.5%Hard0
1175Prime Arrangements51.0%Easy0
1176Diet Plan Performance53.8%Easy0
1255Maximum Score Words Formed by Letters69.4%Hard0
1260Shift 2D Grid61.4%Easy0
1305All Elements in Two Binary Search Trees76.1%Medium0
1327List the Products Ordered in a Period76.4%Easy0
1350Students With Invalid Departments89.5%Easy0
1404Number of Steps to Reduce a Number in Binary Representation to One50.4%Medium0
1408String Matching in an Array61.4%Easy0
1409Queries on a Permutation With Key81.7%Medium0
1421NPV Queries80.6%Medium0
1457Pseudo-Palindromic Paths in a Binary Tree67.3%Medium0
1489Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree50.6%Hard0
1496Path Crossing55.9%Easy0
1485Clone Binary Tree With Random Pointer81.0%Medium0
1502Can Make Arithmetic Progression From Sequence73.3%Easy0
1490Clone N-ary Tree84.5%Medium0
1533Find the Index of the Large Integer57.1%Medium0

Leave a Reply