Skip to content

Instantly share code, notes, and snippets.

@sushinoya
Last active August 21, 2021 20:05
Show Gist options
  • Save sushinoya/4ed2c1adda91e2508080f6163db61344 to your computer and use it in GitHub Desktop.
Save sushinoya/4ed2c1adda91e2508080f6163db61344 to your computer and use it in GitHub Desktop.

Leetcode Problems Sorted By Popularity

Leetcode does not allow sorting problems by upvotes/downvotes. That is probably to encourage users to attempt newer problems. However, for someone with limited preparation time, going through the most popular questions first might be helpful. Hence, here is a list of Leetcode questions sorted by popularity. The data are accurate as of 13th July 2021. [Raw Markdown]

Rank Problem Difficulty Upvotes Downvotes
1 1. Two Sum Easy 22445 760
2 3. Longest Substring Without Repeating Characters Medium 15724 778
3 53. Maximum Subarray Easy 13025 620
4 2. Add Two Numbers Medium 12715 2909
5 42. Trapping Rain Water Hard 12461 178
6 5. Longest Palindromic Substring Medium 11908 739
7 15. 3Sum Medium 11652 1152
8 4. Median of Two Sorted Arrays Hard 11147 1600
9 11. Container With Most Water Medium 10462 745
10 121. Best Time to Buy and Sell Stock Easy 9459 392
11 200. Number of Islands Medium 9202 255
12 146. LRU Cache Medium 9131 361
13 22. Generate Parentheses Medium 8752 360
14 33. Search in Rotated Sorted Array Medium 8620 704
15 287. Find the Duplicate Number Medium 8291 873
16 56. Merge Intervals Medium 8250 399
17 20. Valid Parentheses Easy 8127 333
18 560. Subarray Sum Equals K Medium 8115 273
19 300. Longest Increasing Subsequence Medium 8090 174
20 238. Product of Array Except Self Medium 8058 583
21 23. Merge k Sorted Lists Hard 7845 368
22 206. Reverse Linked List Easy 7649 143
23 198. House Robber Medium 7598 201
24 322. Coin Change Medium 7548 207
25 21. Merge Two Sorted Lists Easy 7458 815
26 152. Maximum Product Subarray Medium 7438 240
27 70. Climbing Stairs Easy 7235 223
28 139. Word Break Medium 7221 340
29 76. Minimum Window Substring Hard 7180 467
30 55. Jump Game Medium 6961 443
31 46. Permutations Medium 6719 139
32 136. Single Number Easy 6687 215
33 101. Symmetric Tree Easy 6675 175
34 17. Letter Combinations of a Phone Number Medium 6642 548
35 98. Validate Binary Search Tree Medium 6641 727
36 39. Combination Sum Medium 6625 166
37 236. Lowest Common Ancestor of a Binary Tree Medium 6524 219
38 84. Largest Rectangle in Histogram Hard 6475 112
39 239. Sliding Window Maximum Hard 6469 245
40 207. Course Schedule Medium 6410 269
41 78. Subsets Medium 6364 118
42 41. First Missing Positive Hard 6308 1063
43 124. Binary Tree Maximum Path Sum Hard 6304 421
44 34. Find First and Last Position of Element in Sorted Array Medium 6289 215
45 31. Next Permutation Medium 6259 2079
46 79. Word Search Medium 6210 252
47 215. Kth Largest Element in an Array Medium 6196 382
48 160. Intersection of Two Linked Lists Easy 6142 685
49 10. Regular Expression Matching Hard 6141 877
50 72. Edit Distance Hard 6077 72
51 128. Longest Consecutive Sequence Medium 6074 279
52 19. Remove Nth Node From End of List Medium 6000 331
53 283. Move Zeroes Easy 5992 178
54 75. Sort Colors Medium 5974 328
55 49. Group Anagrams Medium 5954 242
56 105. Construct Binary Tree from Preorder and Inorder Traversal Medium 5934 145
57 234. Palindrome Linked List Easy 5807 454
58 226. Invert Binary Tree Easy 5673 81
59 169. Majority Element Easy 5667 271
60 62. Unique Paths Medium 5660 251
61 48. Rotate Image Medium 5611 365
62 138. Copy List with Random Pointer Medium 5602 845
63 32. Longest Valid Parentheses Hard 5591 194
64 437. Path Sum III Medium 5523 326
65 347. Top K Frequent Elements Medium 5468 286
66 155. Min Stack Easy 5456 495
67 394. Decode String Medium 5438 250
68 127. Word Ladder Hard 5413 1454
69 102. Binary Tree Level Order Traversal Medium 5231 113
70 543. Diameter of Binary Tree Easy 5182 318
71 240. Search a 2D Matrix II Medium 5161 96
72 621. Task Scheduler Medium 5156 965
73 64. Minimum Path Sum Medium 5145 86
74 94. Binary Tree Inorder Traversal Easy 5144 223
75 7. Reverse Integer Easy 5121 7734
76 189. Rotate Array Medium 5025 961
77 96. Unique Binary Search Trees Medium 4980 183
78 763. Partition Labels Medium 4965 203
79 221. Maximal Square Medium 4958 115
80 141. Linked List Cycle Easy 4954 641
81 45. Jump Game II Medium 4944 202
82 208. Implement Trie (Prefix Tree) Medium 4865 72
83 114. Flatten Binary Tree to Linked List Medium 4854 425
84 416. Partition Equal Subset Sum Medium 4837 94
85 91. Decode Ways Medium 4801 3516
86 295. Find Median from Data Stream Hard 4795 85
87 279. Perfect Squares Medium 4745 247
88 617. Merge Two Binary Trees Easy 4696 203
89 122. Best Time to Buy and Sell Stock II Easy 4695 2099
90 14. Longest Common Prefix Easy 4695 2340
91 739. Daily Temperatures Medium 4668 135
92 85. Maximal Rectangle Hard 4654 92
93 647. Palindromic Substrings Medium 4649 141
94 297. Serialize and Deserialize Binary Tree Hard 4648 208
95 148. Sort List Medium 4633 183
96 494. Target Sum Medium 4603 182
97 142. Linked List Cycle II Medium 4595 330
98 438. Find All Anagrams in a String Medium 4509 207
99 448. Find All Numbers Disappeared in an Array Easy 4481 312
100 338. Counting Bits Easy 4389 225
101 337. House Robber III Medium 4386 71
102 199. Binary Tree Right Side View Medium 4357 233
103 104. Maximum Depth of Binary Tree Easy 4324 102
104 108. Convert Sorted Array to Binary Search Tree Easy 4298 293
105 26. Remove Duplicates from Sorted Array Easy 4291 7480
106 54. Spiral Matrix Medium 4289 688
107 92. Reverse Linked List II Medium 4280 219
108 230. Kth Smallest Element in a BST Medium 4275 92
109 378. Kth Smallest Element in a Sorted Matrix Medium 4274 202
110 406. Queue Reconstruction by Height Medium 4218 465
111 210. Course Schedule II Medium 4214 178
112 25. Reverse Nodes in k-Group Hard 4172 415
113 209. Minimum Size Subarray Sum Medium 4158 147
114 315. Count of Smaller Numbers After Self Hard 4137 123
115 581. Shortest Unsorted Continuous Subarray Medium 4125 188
116 863. All Nodes Distance K in Binary Tree Medium 4041 80
117 24. Swap Nodes in Pairs Medium 4041 223
118 212. Word Search II Hard 4031 150
119 123. Best Time to Buy and Sell Stock III Hard 3945 93
120 35. Search Insert Position Easy 3913 307
121 309. Best Time to Buy and Sell Stock with Cooldown Medium 3901 128
122 173. Binary Search Tree Iterator Medium 3899 327
123 442. Find All Duplicates in an Array Medium 3876 188
124 312. Burst Balloons Hard 3870 116
125 110. Balanced Binary Tree Easy 3870 243
126 131. Palindrome Partitioning Medium 3869 122
127 153. Find Minimum in Rotated Sorted Array Medium 3868 312
128 73. Set Matrix Zeroes Medium 3857 388
129 103. Binary Tree Zigzag Level Order Traversal Medium 3818 132
130 380. Insert Delete GetRandom O(1) Medium 3812 221
131 116. Populating Next Right Pointers in Each Node Medium 3785 174
132 695. Max Area of Island Medium 3779 114
133 74. Search a 2D Matrix Medium 3771 209
134 572. Subtree of Another Tree Easy 3736 182
135 18. 4Sum Medium 3736 448
136 994. Rotting Oranges Medium 3726 221
137 746. Min Cost Climbing Stairs Easy 3725 766
138 399. Evaluate Division Medium 3681 288
139 16. 3Sum Closest Medium 3653 183
140 329. Longest Increasing Path in a Matrix Hard 3640 61
141 51. N-Queens Hard 3606 116
142 301. Remove Invalid Parentheses Hard 3599 170
143 402. Remove K Digits Medium 3590 155
144 9. Palindrome Number Easy 3581 1789
145 100. Same Tree Easy 3578 94
146 516. Longest Palindromic Subsequence Medium 3492 222
147 143. Reorder List Medium 3488 155
148 112. Path Sum Easy 3486 644
149 1143. Longest Common Subsequence Medium 3483 41
150 235. Lowest Common Ancestor of a Binary Search Tree Easy 3477 142
151 328. Odd Even Linked List Medium 3470 346
152 204. Count Primes Easy 3469 835
153 202. Happy Number Easy 3454 550
154 140. Word Break II Hard 3448 447
155 109. Convert Sorted List to Binary Search Tree Medium 3444 102
156 518. Coin Change 2 Medium 3413 80
157 133. Clone Graph Medium 3397 1801
158 134. Gas Station Medium 3384 453
159 973. K Closest Points to Origin Medium 3379 167
160 179. Largest Number Medium 3373 331
161 310. Minimum Height Trees Medium 3368 139
162 547. Number of Provinces Medium 3342 193
163 268. Missing Number Easy 3340 2591
164 120. Triangle Medium 3339 332
165 787. Cheapest Flights Within K Stops Medium 3324 124
166 95. Unique Binary Search Trees II Medium 3310 220
167 47. Permutations II Medium 3303 81
168 44. Wildcard Matching Hard 3299 155
169 450. Delete Node in a BST Medium 3289 116
170 698. Partition to K Equal Sum Subsets Medium 3281 202
171 162. Find Peak Element Medium 3271 2812
172 692. Top K Frequent Words Medium 3270 212
173 57. Insert Interval Medium 3215 264
174 211. Design Add and Search Words Data Structure Medium 3205 134
175 767. Reorganize String Medium 3205 150
176 82. Remove Duplicates from Sorted List II Medium 3204 129
177 387. First Unique Character in a String Easy 3202 154
178 222. Count Complete Tree Nodes Medium 3186 265
179 63. Unique Paths II Medium 3186 305
180 665. Non-decreasing Array Medium 3165 646
181 983. Minimum Cost For Tickets Medium 3148 61
182 37. Sudoku Solver Hard 3147 114
183 40. Combination Sum II Medium 3140 94
184 213. House Robber II Medium 3135 68
185 113. Path Sum II Medium 3076 88
186 130. Surrounded Regions Medium 3070 832
187 218. The Skyline Problem Hard 3058 170
188 67. Add Binary Easy 3045 370
189 525. Contiguous Array Medium 3028 148
190 229. Majority Element II Medium 3027 230
191 118. Pascal's Triangle Easy 3008 142
192 669. Trim a Binary Search Tree Medium 2984 212
193 203. Remove Linked List Elements Easy 2966 129
194 463. Island Perimeter Easy 2959 151
195 167. Two Sum II - Input array is sorted Easy 2948 756
196 332. Reconstruct Itinerary Medium 2947 1343
197 106. Construct Binary Tree from Inorder and Postorder Traversal Medium 2946 57
198 410. Split Array Largest Sum Hard 2930 97
199 289. Game of Life Medium 2913 357
200 237. Delete Node in a Linked List Easy 2906 9573
201 785. Is Graph Bipartite? Medium 2898 239
202 242. Valid Anagram Easy 2886 169
203 658. Find K Closest Elements Medium 2882 347
204 395. Longest Substring with At Least K Repeating Characters Medium 2866 281
205 90. Subsets II Medium 2865 114
206 680. Valid Palindrome II Easy 2862 182
207 137. Single Number II Medium 2841 415
208 36. Valid Sudoku Medium 2840 581
209 83. Remove Duplicates from Sorted List Easy 2835 154
210 503. Next Greater Element II Medium 2833 97
211 771. Jewels and Stones Easy 2831 434
212 264. Ugly Number II Medium 2830 169
213 316. Remove Duplicate Letters Medium 2830 204
214 743. Network Delay Time Medium 2821 253
215 145. Binary Tree Postorder Traversal Easy 2816 119
216 257. Binary Tree Paths Easy 2800 143
217 540. Single Element in a Sorted Array Medium 2798 88
218 97. Interleaving String Medium 2794 142
219 392. Is Subsequence Easy 2782 249
220 99. Recover Binary Search Tree Medium 2776 105
221 714. Best Time to Buy and Sell Stock with Transaction Fee Medium 2767 77
222 538. Convert BST to Greater Tree Medium 2765 146
223 43. Multiply Strings Medium 2755 1096
224 654. Maximum Binary Tree Medium 2744 276
225 1004. Max Consecutive Ones III Medium 2743 41
226 424. Longest Repeating Character Replacement Medium 2732 127
227 876. Middle of the Linked List Easy 2725 79
228 61. Rotate List Medium 2721 1174
229 977. Squares of a Sorted Array Easy 2706 117
230 111. Minimum Depth of Binary Tree Easy 2697 843
231 718. Maximum Length of Repeated Subarray Medium 2695 65
232 979. Distribute Coins in Binary Tree Medium 2694 86
233 188. Best Time to Buy and Sell Stock IV Hard 2687 144
234 50. Pow(x, n) Medium 2679 4018
235 334. Increasing Triplet Subsequence Medium 2677 171
236 721. Accounts Merge Medium 2676 471
237 844. Backspace String Compare Easy 2674 120
238 567. Permutation in String Medium 2673 82
239 126. Word Ladder II Hard 2672 304
240 1192. Critical Connections in a Network Hard 2665 127
241 344. Reverse String Easy 2646 799
242 938. Range Sum of BST Easy 2640 301
243 117. Populating Next Right Pointers in Each Node II Medium 2638 203
244 28. Implement strStr() Easy 2619 2534
245 684. Redundant Connection Medium 2616 265
246 542. 01 Matrix Medium 2612 137
247 451. Sort Characters By Frequency Medium 2611 155
248 174. Dungeon Game Hard 2584 54
249 459. Repeated Substring Pattern Easy 2584 258
250 66. Plus One Easy 2583 3403
251 227. Basic Calculator II Medium 2576 391
252 6. ZigZag Conversion Medium 2575 6206
253 445. Add Two Numbers II Medium 2566 203
254 713. Subarray Product Less Than K Medium 2554 97
255 129. Sum Root to Leaf Numbers Medium 2546 64
256 678. Valid Parenthesis String Medium 2527 69
257 77. Combinations Medium 2512 89
258 144. Binary Tree Preorder Traversal Easy 2510 93
259 260. Single Number III Medium 2507 140
260 86. Partition List Medium 2505 427
261 60. Permutation Sequence Hard 2502 373
262 986. Interval List Intersections Medium 2492 66
263 430. Flatten a Multilevel Doubly Linked List Medium 2485 196
264 350. Intersection of Two Arrays II Easy 2478 540
265 456. 132 Pattern Medium 2474 150
266 341. Flatten Nested List Iterator Medium 2467 891
267 377. Combination Sum IV Medium 2466 274
268 673. Number of Longest Increasing Subsequence Medium 2463 128
269 687. Longest Univalue Path Medium 2450 568
270 662. Maximum Width of Binary Tree Medium 2436 423
271 278. First Bad Version Easy 2434 890
272 224. Basic Calculator Hard 2423 218
273 856. Score of Parentheses Medium 2421 74
274 1011. Capacity To Ship Packages Within D Days Medium 2420 62
275 205. Isomorphic Strings Easy 2420 512
276 1249. Minimum Remove to Make Valid Parentheses Medium 2400 50
277 417. Pacific Atlantic Water Flow Medium 2387 609
278 241. Different Ways to Add Parentheses Medium 2377 125
279 81. Search in Rotated Sorted Array II Medium 2362 601
280 1130. Minimum Cost Tree From Leaf Values Medium 2354 173
281 27. Remove Element Easy 2340 3765
282 107. Binary Tree Level Order Traversal II Medium 2330 256
283 435. Non-overlapping Intervals Medium 2320 69
284 461. Hamming Distance Easy 2318 179
285 797. All Paths From Source to Target Medium 2284 99
286 354. Russian Doll Envelopes Hard 2273 62
287 421. Maximum XOR of Two Numbers in an Array Medium 2258 224
288 653. Two Sum IV - Input is a BST Easy 2256 161
289 652. Find Duplicate Subtrees Medium 2239 252
290 784. Letter Case Permutation Medium 2235 127
291 69. Sqrt(x) Easy 2232 2482
292 1277. Count Square Submatrices with All Ones Medium 2231 38
293 460. LFU Cache Hard 2226 159
294 907. Sum of Subarray Minimums Medium 2217 136
295 733. Flood Fill Easy 2201 263
296 125. Valid Palindrome Easy 2201 4043
297 1048. Longest String Chain Medium 2194 116
298 336. Palindrome Pairs Hard 2180 199
299 115. Distinct Subsequences Hard 2178 82
300 637. Average of Levels in Binary Tree Easy 2167 210
301 307. Range Sum Query - Mutable Medium 2163 120
302 454. 4Sum II Medium 2160 85
303 373. Find K Pairs with Smallest Sums Medium 2157 142
304 1008. Construct Binary Search Tree from Preorder Traversal Medium 2139 50
305 735. Asteroid Collision Medium 2133 179
306 486. Predict the Winner Medium 2118 115
307 752. Open the Lock Medium 2088 71
308 449. Serialize and Deserialize BST Medium 2086 99
309 841. Keys and Rooms Medium 2067 140
310 474. Ones and Zeroes Medium 2060 298
311 132. Palindrome Partitioning II Hard 2055 59
312 80. Remove Duplicates from Sorted Array II Medium 2039 820
313 404. Sum of Left Leaves Easy 2036 189
314 290. Word Pattern Easy 2034 236
315 216. Combination Sum III Medium 2015 67
316 368. Largest Divisible Subset Medium 2014 95
317 1110. Delete Nodes And Return Forest Medium 1992 59
318 407. Trapping Rain Water II Hard 1990 43
319 792. Number of Matching Subsequences Medium 1989 114
320 895. Maximum Frequency Stack Hard 1987 37
321 135. Candy Hard 1978 218
322 415. Add Strings Easy 1977 408
323 1047. Remove All Adjacent Duplicates In String Easy 1975 114
324 1029. Two City Scheduling Medium 1970 205
325 862. Shortest Subarray with Sum at Least K Hard 1969 45
326 724. Find Pivot Index Easy 1963 326
327 29. Divide Two Integers Medium 1963 7328
328 992. Subarrays with K Different Integers Hard 1958 29
329 12. Integer to Roman Medium 1956 3318
330 650. 2 Keys Keyboard Medium 1952 138
331 217. Contains Duplicate Easy 1939 860
332 583. Delete Operation for Two Strings Medium 1938 38
333 232. Implement Queue using Stacks Easy 1932 173
334 190. Reverse Bits Easy 1932 615
335 413. Arithmetic Slices Medium 1929 208
336 1365. How Many Numbers Are Smaller Than the Current Number Easy 1926 45
337 452. Minimum Number of Arrows to Burst Balloons Medium 1920 66
338 150. Evaluate Reverse Polish Notation Medium 1920 550
339 93. Restore IP Addresses Medium 1915 579
340 968. Binary Tree Cameras Hard 1912 29
341 953. Verifying an Alien Dictionary Easy 1909 751
342 376. Wiggle Subsequence Medium 1907 81
343 1423. Maximum Points You Can Obtain from Cards Medium 1898 84
344 905. Sort Array By Parity Easy 1895 99
345 946. Validate Stack Sequences Medium 1892 36
346 304. Range Sum Query 2D - Immutable Medium 1866 222
347 974. Subarray Sums Divisible by K Medium 1837 122
348 168. Excel Sheet Column Title Easy 1835 321
349 171. Excel Sheet Column Number Easy 1827 212
350 371. Sum of Two Integers Medium 1824 2896
351 343. Integer Break Medium 1819 277
352 151. Reverse Words in a String Medium 1814 3344
353 59. Spiral Matrix II Medium 1813 134
354 696. Count Binary Substrings Easy 1798 302
355 628. Maximum Product of Three Numbers Easy 1794 462
356 214. Shortest Palindrome Hard 1780 156
357 918. Maximum Sum Circular Subarray Medium 1774 78
358 997. Find the Town Judge Easy 1773 138
359 1209. Remove All Adjacent Duplicates in String II Medium 1766 36
360 282. Expression Add Operators Hard 1761 294
361 1038. Binary Search Tree to Greater Sum Tree Medium 1752 117
362 740. Delete and Earn Medium 1750 133
363 741. Cherry Pickup Hard 1749 100
364 875. Koko Eating Bananas Medium 1746 101
365 987. Vertical Order Traversal of a Binary Tree Hard 1743 2616
366 403. Frog Jump Hard 1736 137
367 409. Longest Palindrome Easy 1724 108
368 154. Find Minimum in Rotated Sorted Array II Hard 1718 284
369 871. Minimum Number of Refueling Stops Hard 1717 35
370 701. Insert into a Binary Search Tree Medium 1716 103
371 821. Shortest Distance to a Character Easy 1711 111
372 659. Split Array into Consecutive Subsequences Medium 1706 500
373 220. Contains Duplicate III Medium 1703 1768
374 706. Design HashMap Easy 1695 187
375 947. Most Stones Removed with Same Row or Column Medium 1670 478
376 191. Number of 1 Bits Easy 1662 656
377 493. Reverse Pairs Hard 1656 155
378 901. Online Stock Span Medium 1650 180
379 801. Minimum Swaps To Make Sequences Increasing Hard 1649 119
380 1002. Find Common Characters Easy 1649 152
381 894. All Possible Full Binary Trees Medium 1646 139
382 1480. Running Sum of 1d Array Easy 1643 147
383 670. Maximum Swap Medium 1641 97
384 980. Unique Paths III Hard 1633 96
385 887. Super Egg Drop Hard 1631 103
386 1302. Deepest Leaves Sum Medium 1629 62
387 349. Intersection of Two Arrays Easy 1616 1626
388 700. Search in a Binary Search Tree Easy 1611 135
389 605. Can Place Flowers Easy 1598 497
390 363. Max Sum of Rectangle No Larger Than K Hard 1596 99
391 886. Possible Bipartition Medium 1592 39
392 897. Increasing Order Search Tree Easy 1591 545
393 480. Sliding Window Median Hard 1575 104
394 814. Binary Tree Pruning Medium 1574 58
395 509. Fibonacci Number Easy 1574 231
396 646. Maximum Length of Pair Chain Medium 1571 91
397 273. Integer to English Words Hard 1571 3891
398 704. Binary Search Easy 1561 68
399 557. Reverse Words in a String III Easy 1553 109
400 1235. Maximum Profit in Job Scheduling Hard 1551 16
401 632. Smallest Range Covering Elements from K Lists Hard 1544 28
402 934. Shortest Bridge Medium 1542 95
403 554. Brick Wall Medium 1534 76
404 1019. Next Greater Node In Linked List Medium 1534 79
405 324. Wiggle Sort II Medium 1534 695
406 164. Maximum Gap Hard 1533 245
407 1010. Pairs of Songs With Total Durations Divisible by 60 Medium 1525 88
408 611. Valid Triangle Number Medium 1525 112
409 231. Power of Two Easy 1525 227
410 119. Pascal's Triangle II Easy 1523 229
411 1046. Last Stone Weight Easy 1500 39
412 513. Find Bottom Left Tree Value Medium 1499 179
413 559. Maximum Depth of N-ary Tree Easy 1498 62
414 501. Find Mode in Binary Search Tree Easy 1495 448
415 219. Contains Duplicate II Easy 1494 1483
416 485. Max Consecutive Ones Easy 1492 388
417 719. Find K-th Smallest Pair Distance Hard 1486 52
418 630. Course Schedule III Hard 1483 48
419 959. Regions Cut By Slashes Medium 1481 292
420 766. Toeplitz Matrix Easy 1472 97
421 201. Bitwise AND of Numbers Range Medium 1472 150
422 712. Minimum ASCII Delete Sum for Two Strings Medium 1470 58
423 412. Fizz Buzz Easy 1459 1652
424 865. Smallest Subtree with all the Deepest Nodes Medium 1456 305
425 697. Degree of an Array Easy 1455 1011
426 832. Flipping an Image Easy 1453 186
427 729. My Calendar I Medium 1452 50
428 834. Sum of Distances in Tree Hard 1449 48
429 515. Find Largest Value in Each Tree Row Medium 1449 73
430 1043. Partition Array for Maximum Sum Medium 1448 163
431 1027. Longest Arithmetic Subsequence Medium 1447 81
432 1041. Robot Bounded In Circle Medium 1447 394
433 172. Factorial Trailing Zeroes Easy 1445 1458
434 355. Design Twitter Medium 1443 243
435 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Medium 1436 70
436 464. Can I Win Medium 1436 230
437 1306. Jump Game III Medium 1434 40
438 688. Knight Probability in Chessboard Medium 1433 249
439 526. Beautiful Arrangement Medium 1427 226
440 1155. Number of Dice Rolls With Target Sum Medium 1420 65
441 1512. Number of Good Pairs Easy 1420 113
442 849. Maximize Distance to Closest Person Medium 1420 135
443 1049. Last Stone Weight II Medium 1416 53
444 443. String Compression Medium 1416 3454
445 950. Reveal Cards In Increasing Order Medium 1415 228
446 881. Boats to Save People Medium 1403 51
447 303. Range Sum Query - Immutable Easy 1403 1427
448 389. Find the Difference Easy 1397 324
449 498. Diagonal Traverse Medium 1396 429
450 1290. Convert Binary Number in a Linked List to Integer Easy 1392 73
451 530. Minimum Absolute Difference in BST Easy 1392 100
452 367. Valid Perfect Square Easy 1388 196
453 921. Minimum Add to Make Parentheses Valid Medium 1380 89
454 890. Find and Replace Pattern Medium 1380 105
455 889. Construct Binary Tree from Preorder and Postorder Traversal Medium 1379 66
456 1026. Maximum Difference Between Node and Ancestor Medium 1374 42
457 1470. Shuffle the Array Easy 1373 142
458 703. Kth Largest Element in a Stream Easy 1373 869
459 657. Robot Return to Origin Easy 1372 699
460 981. Time Based Key-Value Store Medium 1371 158
461 318. Maximum Product of Word Lengths Medium 1370 88
462 1094. Car Pooling Medium 1369 42
463 1022. Sum of Root To Leaf Binary Numbers Easy 1369 98
464 30. Substring with Concatenation of All Words Hard 1367 1543
465 1091. Shortest Path in Binary Matrix Medium 1366 83
466 931. Minimum Falling Path Sum Medium 1361 85
467 528. Random Pick with Weight Medium 1355 2959
468 1007. Minimum Domino Rotations For Equal Row Medium 1328 196
469 556. Next Greater Element III Medium 1326 276
470 1268. Search Suggestions System Medium 1324 101
471 689. Maximum Sum of 3 Non-Overlapping Subarrays Hard 1322 86
472 175. Combine Two Tables Easy 1320 164
473 472. Concatenated Words Hard 1315 160
474 802. Find Eventual Safe States Medium 1307 249
475 187. Repeated DNA Sequences Medium 1304 343
476 813. Largest Sum of Averages Medium 1298 64
477 857. Minimum Cost to Hire K Workers Hard 1297 154
478 778. Swim in Rising Water Hard 1290 99
479 872. Leaf-Similar Trees Easy 1288 51
480 845. Longest Mountain in Array Medium 1285 49
481 258. Add Digits Easy 1276 1344
482 674. Longest Continuous Increasing Subsequence Easy 1268 149
483 877. Stone Game Medium 1266 1473
484 942. DI String Match Easy 1260 499
485 1092. Shortest Common Supersequence Hard 1257 31
486 1351. Count Negative Numbers in a Sorted Matrix Easy 1252 58
487 476. Number Complement Easy 1251 88
488 852. Peak Index in a Mountain Array Easy 1251 1422
489 176. Second Highest Salary Easy 1250 595
490 1035. Uncrossed Lines Medium 1244 24
491 929. Unique Email Addresses Easy 1243 225
492 532. K-diff Pairs in an Array Medium 1243 1618
493 594. Longest Harmonious Subsequence Easy 1240 129
494 1074. Number of Submatrices That Sum to Target Hard 1239 33
495 795. Number of Subarrays with Bounded Maximum Medium 1237 79
496 566. Reshape the Matrix Easy 1236 135
497 807. Max Increase to Keep City Skyline Medium 1236 356
498 815. Bus Routes Hard 1235 38
499 166. Fraction to Recurring Decimal Medium 1235 2401
500 1221. Split a String in Balanced Strings Easy 1233 649
501 645. Set Mismatch Easy 1232 461
502 1219. Path with Maximum Gold Medium 1229 41
503 58. Length of Last Word Easy 1227 3362
504 381. Insert Delete GetRandom O(1) - Duplicates allowed Hard 1222 96
505 796. Rotate String Easy 1219 72
506 1122. Relative Sort Array Easy 1219 82
507 473. Matchsticks to Square Medium 1216 104
508 477. Total Hamming Distance Medium 1210 68
509 1395. Count Number of Teams Medium 1208 132
510 225. Implement Stack using Queues Easy 1207 704
511 685. Redundant Connection II Hard 1197 252
512 1539. Kth Missing Positive Number Easy 1192 75
513 765. Couples Holding Hands Hard 1191 73
514 937. Reorder Data in Log Files Easy 1189 3075
515 1079. Letter Tile Possibilities Medium 1185 41
516 589. N-ary Tree Preorder Traversal Easy 1184 68
517 576. Out of Boundary Paths Medium 1182 173
518 769. Max Chunks To Make Sorted Medium 1177 148
519 783. Minimum Distance Between BST Nodes Easy 1177 270
520 68. Text Justification Hard 1172 2156
521 622. Design Circular Queue Medium 1171 145
522 327. Count of Range Sum Hard 1169 129
523 1315. Sum of Nodes with Even-Valued Grandparent Medium 1166 41
524 147. Insertion Sort List Medium 1163 701
525 690. Employee Importance Easy 1163 976
526 636. Exclusive Time of Functions Medium 1154 1887
527 922. Sort Array By Parity II Easy 1151 59
528 414. Third Maximum Number Easy 1146 1886
529 345. Reverse Vowels of a String Easy 1142 1555
530 791. Custom Sort String Medium 1141 227
531 951. Flip Equivalent Binary Trees Medium 1138 58
532 1031. Maximum Sum of Two Non-Overlapping Subarrays Medium 1135 55
533 925. Long Pressed Name Easy 1133 198
534 565. Array Nesting Medium 1132 120
535 1314. Matrix Block Sum Medium 1127 192
536 1329. Sort the Matrix Diagonally Medium 1125 156
537 590. N-ary Tree Postorder Traversal Easy 1122 75
538 375. Guess Number Higher or Lower II Medium 1116 1550
539 873. Length of Longest Fibonacci Subsequence Medium 1111 43
540 13. Roman to Integer Easy 1107 91
541 1319. Number of Operations to Make Network Connected Medium 1105 18
542 836. Rectangle Overlap Easy 1104 339
543 89. Gray Code Medium 1104 2023
544 228. Summary Ranges Easy 1102 753
545 686. Repeated String Match Medium 1100 855
546 725. Split Linked List in Parts Medium 1096 159
547 643. Maximum Average Subarray I Easy 1093 141
548 859. Buddy Strings Easy 1090 747
549 896. Monotonic Array Easy 1089 46
550 429. N-ary Tree Level Order Traversal Medium 1089 67
551 1089. Duplicate Zeros Easy 1088 368
552 941. Valid Mountain Array Easy 1085 102
553 524. Longest Word in Dictionary through Deleting Medium 1082 303
554 1305. All Elements in Two Binary Search Trees Medium 1080 42
555 648. Replace Words Medium 1074 146
556 491. Increasing Subsequences Medium 1066 142
557 52. N-Queens II Hard 1065 193
558 773. Sliding Puzzle Hard 1064 32
559 870. Advantage Shuffle Medium 1056 68
560 1000. Minimum Cost to Merge Stones Hard 1055 65
561 939. Minimum Area Rectangle Medium 1055 186
562 441. Arranging Coins Easy 1054 816
563 1448. Count Good Nodes in Binary Tree Medium 1051 43
564 957. Prison Cells After N Days Medium 1048 1350
565 331. Verify Preorder Serialization of a Binary Tree Medium 1046 61
566 1239. Maximum Length of a Concatenated String with Unique Characters Medium 1044 97
567 419. Battleships in a Board Medium 1041 643
568 1504. Count Submatrices With All Ones Medium 1039 78
569 1081. Smallest Subsequence of Distinct Characters Medium 1039 119
570 606. Construct String from Binary Tree Easy 1036 1411
571 846. Hand of Straights Medium 1034 101
572 912. Sort an Array Medium 1033 409
573 975. Odd Even Jump Hard 1027 305
574 1353. Maximum Number of Events That Can Be Attended Medium 1024 143
575 321. Create Maximum Number Hard 1023 281
576 299. Bulls and Cows Medium 1023 1108
577 1342. Number of Steps to Reduce a Number to Zero Easy 1020 90
578 819. Most Common Word Easy 1015 2186
579 779. K-th Symbol in Grammar Medium 1013 212
580 1248. Count Number of Nice Subarrays Medium 1012 27
581 1162. As Far from Land as Possible Medium 1004 40
582 1482. Minimum Number of Days to Make m Bouquets Medium 998 25
583 1254. Number of Closed Islands Medium 998 27
584 1171. Remove Zero Sum Consecutive Nodes from Linked List Medium 990 60
585 508. Most Frequent Subtree Sum Medium 990 161
586 720. Longest Word in Dictionary Medium 990 1145
587 623. Add One Row to Tree Medium 987 166
588 1337. The K Weakest Rows in a Matrix Easy 985 70
589 178. Rank Scores Medium 983 176
590 475. Heaters Medium 983 955
591 880. Decoded String at Index Medium 980 168
592 529. Minesweeper Medium 978 697
593 804. Unique Morse Code Words Easy 978 881
594 313. Super Ugly Number Medium 975 177
595 563. Binary Tree Tilt Easy 974 1628
596 462. Minimum Moves to Equal Array Elements II Medium 972 63
597 1383. Maximum Performance of a Team Hard 967 37
598 1105. Filling Bookcase Shelves Medium 965 58
599 679. 24 Game Hard 962 190
600 383. Ransom Note Easy 962 249
601 342. Power of Four Easy 961 261
602 1146. Snapshot Array Medium 955 173
603 382. Linked List Random Node Medium 955 243
604 1202. Smallest String With Swaps Medium 952 34
605 274. H-Index Medium 952 1552
606 535. Encode and Decode TinyURL Medium 951 1922
607 935. Knight Dialer Medium 950 307
608 453. Minimum Moves to Equal Array Elements Easy 949 1296
609 847. Shortest Path Visiting All Nodes Hard 947 91
610 1431. Kids With the Greatest Number of Candies Easy 942 206
611 728. Self Dividing Numbers Easy 942 329
612 1161. Maximum Level Sum of a Binary Tree Medium 941 44
613 87. Scramble String Hard 941 847
614 1376. Time Needed to Inform All Employees Medium 940 79
615 838. Push Dominoes Medium 939 81
616 707. Design Linked List Medium 938 944
617 455. Assign Cookies Easy 937 130
618 546. Remove Boxes Hard 934 63
619 1312. Minimum Insertion Steps to Make a String Palindrome Hard 929 15
620 1367. Linked List in Binary Tree Medium 929 36
621 990. Satisfiability of Equality Equations Medium 928 9
622 991. Broken Calculator Medium 928 134
623 1044. Longest Duplicate Substring Hard 925 266
624 930. Binary Subarrays With Sum Medium 922 35
625 914. X of a Kind in a Deck of Cards Easy 917 232
626 917. Reverse Only Letters Easy 916 45
627 1025. Divisor Game Easy 916 2367
628 1140. Stone Game II Medium 914 205
629 860. Lemonade Change Easy 912 103
630 965. Univalued Binary Tree Easy 910 52
631 1186. Maximum Subarray Sum with One Deletion Medium 909 34
632 1021. Remove Outermost Parentheses Easy 906 932
633 181. Employees Earning More Than Their Managers Easy 898 119
634 1266. Minimum Time Visiting All Points Easy 897 137
635 1382. Balance a Binary Search Tree Medium 896 36
636 671. Second Minimum Node In a Binary Tree Easy 896 1165
637 827. Making A Large Island Hard 895 25
638 730. Count Different Palindromic Subsequences Hard 890 53
639 1325. Delete Leaves With a Given Value Medium 883 18
640 731. My Calendar II Medium 883 107
641 1071. Greatest Common Divisor of Strings Easy 882 203
642 843. Guess the Word Hard 878 925
643 1293. Shortest Path in a Grid with Obstacles Elimination Hard 877 14
644 775. Global and Local Inversions Medium 877 270
645 520. Detect Capital Easy 877 299
646 263. Ugly Number Easy 862 848
647 1032. Stream of Characters Hard 861 123
648 599. Minimum Index Sum of Two Lists Easy 861 256
649 1299. Replace Elements with Greatest Element on Right Side Easy 860 151
650 165. Compare Version Numbers Medium 859 1743
651 1190. Reverse Substrings Between Each Pair of Parentheses Medium 858 28
652 1463. Cherry Pickup II Hard 855 11
653 1283. Find the Smallest Divisor Given a Threshold Medium 855 136
654 799. Champagne Tower Medium 848 62
655 969. Pancake Sorting Medium 847 1070
656 467. Unique Substrings in Wraparound String Medium 846 113
657 1477. Find Two Non-overlapping Sub-arrays Each With Target Sum Medium 840 48
658 1052. Grumpy Bookstore Owner Medium 840 77
659 1338. Reduce Array Size to The Half Medium 836 67
660 962. Maximum Width Ramp Medium 834 25
661 432. All O`one Data Structure Hard 833 104
662 926. Flip String to Monotone Increasing Medium 832 26
663 1262. Greatest Sum Divisible by Three Medium 832 26
664 1396. Design Underground System Medium 832 61
665 888. Fair Candy Swap Easy 829 172
666 386. Lexicographical Numbers Medium 828 99
667 284. Peeking Iterator Medium 828 576
668 292. Nim Game Easy 826 1938
669 1024. Video Stitching Medium 822 39
670 853. Car Fleet Medium 815 308
671 1296. Divide Array in Sets of K Consecutive Numbers Medium 810 73
672 1358. Number of Substrings Containing All Three Characters Medium 808 18
673 1466. Reorder Routes to Make All Paths Lead to the City Zero Medium 808 25
674 639. Decode Ways II Hard 805 689
675 943. Find the Shortest Superstring Hard 797 112
676 436. Find Right Interval Medium 797 204
677 638. Shopping Offers Medium 796 549
678 1129. Shortest Path with Alternating Colors Medium 793 42
679 780. Reaching Points Hard 793 132
680 705. Design HashSet Easy 790 115
681 185. Department Top Three Salaries Hard 790 167
682 1335. Minimum Difficulty of a Job Schedule Hard 789 93
683 745. Prefix and Suffix Search Hard 789 293
684 552. Student Attendance Record II Hard 788 140
685 682. Baseball Game Easy 787 1258
686 1108. Defanging an IP Address Easy 786 1272
687 1013. Partition Array Into Three Parts With Equal Sum Easy 784 93
688 676. Implement Magic Dictionary Medium 784 167
689 1114. Print in Order Easy 783 139
690 1123. Lowest Common Ancestor of Deepest Leaves Medium 782 658
691 401. Binary Watch Easy 782 1407
692 709. To Lower Case Easy 781 2048
693 575. Distribute Candies Easy 778 1049
694 916. Word Subsets Medium 777 113
695 668. Kth Smallest Number in Multiplication Table Hard 776 25
696 1207. Unique Number of Occurrences Easy 775 27
697 1326. Minimum Number of Taps to Open to Water a Garden Hard 774 71
698 388. Longest Absolute File Path Medium 773 1788
699 898. Bitwise ORs of Subarrays Medium 772 154
700 1371. Find the Longest Substring Containing Vowels in Even Counts Medium 770 30
701 837. New 21 Game Medium 769 468
702 855. Exam Room Medium 768 315
703 1530. Number of Good Leaf Nodes Pairs Medium 767 15
704 861. Score After Flipping Matrix Medium 763 154
705 910. Smallest Range II Medium 762 295
706 811. Subdomain Visit Count Easy 762 935
707 446. Arithmetic Slices II - Subsequence Hard 761 72
708 754. Reach a Number Medium 758 560
709 1457. Pseudo-Palindromic Paths in a Binary Tree Medium 757 25
710 1109. Corporate Flight Bookings Medium 749 128
711 1295. Find Numbers with Even Number of Digits Easy 748 84
712 744. Find Smallest Letter Greater Than Target Easy 748 828
713 633. Sum of Square Numbers Medium 745 396
714 923. 3Sum With Multiplicity Medium 739 128
715 1557. Minimum Number of Vertices to Reach All Nodes Medium 738 48
716 1145. Binary Tree Coloring Game Medium 738 151
717 1220. Count Vowels Permutation Hard 733 82
718 867. Transpose Matrix Easy 733 342
719 1345. Jump Game IV Hard 731 47
720 1028. Recover a Tree From Preorder Traversal Hard 730 26
721 470. Implement Rand10() Using Rand7() Medium 729 244
722 1039. Minimum Score Triangulation of Polygon Medium 728 95
723 945. Minimum Increment to Make Array Unique Medium 724 31
724 1347. Minimum Number of Steps to Make Two Strings Anagram Medium 724 46
725 715. Range Module Hard 724 55
726 539. Minimum Time Difference Medium 722 176
727 967. Numbers With Same Consecutive Differences Medium 721 127
728 1104. Path In Zigzag Labelled Binary Tree Medium 719 209
729 988. Smallest String Starting From Leaf Medium 718 131
730 1528. Shuffle String Easy 718 189
731 978. Longest Turbulent Subarray Medium 717 135
732 184. Department Highest Salary Medium 717 145
733 675. Cut Off Trees for Golf Event Hard 717 426
734 1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts Medium 716 180
735 182. Duplicate Emails Easy 714 39
736 823. Binary Trees With Factors Medium 710 94
737 818. Race Car Hard 702 75
738 677. Map Sum Pairs Medium 701 96
739 726. Number of Atoms Hard 700 181
740 961. N-Repeated Element in Size 2N Array Easy 700 267
741 398. Random Pick Index Medium 700 876
742 1288. Remove Covered Intervals Medium 697 27
743 609. Find Duplicate File in System Medium 696 835
744 177. Nth Highest Salary Medium 695 513
745 1124. Longest Well-Performing Interval Medium 694 77
746 1160. Find Words That Can Be Formed by Characters Easy 694 102
747 693. Binary Number with Alternating Bits Easy 691 95
748 500. Keyboard Row Easy 691 783
749 1498. Number of Subsequences That Satisfy the Given Sum Condition Medium 687 67
750 374. Guess Number Higher or Lower Easy 687 2170
751 1200. Minimum Absolute Difference Easy 686 35
752 842. Split Array into Fibonacci Sequence Medium 686 216
753 1514. Path with Maximum Probability Medium 685 17
754 989. Add to Array-Form of Integer Easy 685 104
755 828. Count Unique Characters of All Substrings of a Given String Hard 682 69
756 319. Bulb Switcher Medium 682 1310
757 1014. Best Sightseeing Pair Medium 679 27
758 1137. N-th Tribonacci Number Easy 679 60
759 1372. Longest ZigZag Path in a Binary Tree Medium 676 14
760 629. K Inverse Pairs Array Hard 675 103
761 405. Convert a Number to Hexadecimal Easy 675 139
762 1381. Design a Stack With Increment Operation Medium 673 57
763 330. Patching Array Hard 672 86
764 1323. Maximum 69 Number Easy 672 96
765 768. Max Chunks To Make Sorted II Hard 671 25
766 1436. Destination City Easy 671 48
767 829. Consecutive Numbers Sum Hard 669 836
768 884. Uncommon Words from Two Sentences Easy 668 110
769 1406. Stone Game III Hard 665 11
770 1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance Medium 665 37
771 738. Monotone Increasing Digits Medium 665 78
772 1488. Avoid Flood in The City Medium 661 144
773 180. Consecutive Numbers Medium 661 149
774 1443. Minimum Time to Collect All Apples in a Tree Medium 660 68
775 1267. Count Servers that Communicate Medium 659 63
776 1552. Magnetic Force Between Two Balls Medium 657 63
777 1304. Find N Unique Integers Sum up to Zero Easy 656 353
778 357. Count Numbers with Unique Digits Medium 656 1069
779 1574. Shortest Subarray to be Removed to Make Array Sorted Medium 650 19
780 541. Reverse String II Easy 650 1787
781 1282. Group the People Given the Group Size They Belong To Medium 646 394
782 1005. Maximize Sum Of Array After K Negations Easy 645 61
783 627. Swap Salary Easy 644 319
784 1442. Count Triplets That Can Form Two Arrays of Equal XOR Medium 642 35
785 764. Largest Plus Sign Medium 639 129
786 854. K-Similar Strings Hard 638 45
787 1286. Iterator for Combination Medium 636 48
788 1339. Maximum Product of Splitted Binary Tree Medium 636 48
789 1054. Distant Barcodes Medium 634 29
790 1405. Longest Happy String Medium 633 114
791 1525. Number of Good Ways to Split a String Medium 632 17
792 1309. Decrypt String from Alphabet to Integer Mapping Easy 632 59
793 482. License Key Formatting Easy 626 916
794 940. Distinct Subsequences II Hard 624 19
795 1232. Check If It Is a Straight Line Easy 624 98
796 38. Count and Say Medium 621 1896
797 933. Number of Recent Calls Easy 620 2255
798 390. Elimination Game Medium 618 438
799 1191. K-Concatenation Maximum Sum Medium 617 55
800 1247. Minimum Swaps to Make Strings Equal Medium 616 184
801 664. Strange Printer Hard 615 57
802 820. Short Encoding of Words Medium 614 231
803 595. Big Countries Easy 614 783
804 1368. Minimum Cost to Make at Least One Valid Path in a Grid Hard 613 6
805 1042. Flower Planting With No Adjacent Medium 613 585
806 1291. Sequential Digits Medium 612 56
807 952. Largest Component Size by Common Factor Hard 612 69
808 196. Delete Duplicate Emails Easy 612 899
809 1352. Product of the Last K Numbers Medium 611 34
810 1020. Number of Enclaves Medium 610 28
811 1218. Longest Arithmetic Subsequence of Given Difference Medium 610 33
812 1189. Maximum Number of Balloons Easy 609 50
813 1281. Subtract the Product and Sum of Digits of an Integer Easy 608 156
814 790. Domino and Tromino Tiling Medium 605 314
815 1446. Consecutive Characters Easy 604 16
816 835. Image Overlap Medium 604 789
817 1547. Minimum Cost to Cut a Stick Hard 602 10
818 433. Minimum Genetic Mutation Medium 599 77
819 864. Shortest Path to Get All Keys Hard 598 23
820 1389. Create Target Array in the Given Order Easy 598 804
821 717. 1-bit and 2-bit Characters Easy 598 1535
822 1320. Minimum Distance to Type a Word Using Two Fingers Hard 597 25
823 1095. Find in Mountain Array Hard 597 44
824 1483. Kth Ancestor of a Tree Node Hard 596 65
825 1310. XOR Queries of a Subarray Medium 594 25
826 753. Cracking the Safe Hard 594 871
827 995. Minimum Number of K Consecutive Bit Flips Hard 592 45
828 197. Rising Temperature Easy 588 277
829 667. Beautiful Arrangement II Medium 588 905
830 1472. Design Browser History Medium 586 69
831 803. Bricks Falling When Hit Hard 586 155
832 971. Flip Binary Tree To Match Preorder Traversal Medium 586 220
833 1356. Sort Integers by The Number of 1 Bits Easy 585 26
834 600. Non-negative Integers without Consecutive Ones Hard 585 81
835 1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows Hard 584 7
836 976. Largest Perimeter Triangle Easy 583 59
837 396. Rotate Function Medium 583 190
838 183. Customers Who Never Order Easy 582 58
839 839. Similar String Groups Hard 582 152
840 1344. Angle Between Hands of a Clock Medium 581 133
841 920. Number of Music Playlists Hard 580 60
842 805. Split Array With Same Average Hard 580 98
843 1103. Distribute Candies to People Easy 580 157
844 777. Swap Adjacent in LR String Medium 580 533
845 306. Additive Number Medium 579 552
846 223. Rectangle Area Medium 579 899
847 1424. Diagonal Traverse II Medium 577 65
848 397. Integer Replacement Medium 575 376
849 1572. Matrix Diagonal Sum Easy 573 12
850 1461. Check If a String Contains All Binary Codes of Size K Medium 573 64
851 826. Most Profit Assigning Work Medium 573 87
852 985. Sum of Even Numbers After Queries Easy 571 196
853 1380. Lucky Numbers in a Matrix Easy 570 50
854 1475. Final Prices With a Special Discount in a Shop Easy 569 43
855 1486. XOR Operation in an Array Easy 568 242
856 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold Medium 567 43
857 275. H-Index II Medium 567 887
858 514. Freedom Trail Hard 565 28
859 1402. Reducing Dishes Hard 565 102
860 1425. Constrained Subsequence Sum Hard 564 25
861 1234. Replace the Substring for Balanced String Medium 563 121
862 1551. Minimum Operations to Make Array Equal Medium 562 103
863 786. K-th Smallest Prime Fraction Hard 561 33
864 1411. Number of Ways to Paint N × 3 Grid Hard 560 26
865 502. IPO Hard 560 53
866 1354. Construct Target Array With Multiple Sums Hard 560 68
867 1223. Dice Roll Simulation Hard 559 166
868 458. Poor Pigs Hard 559 1055
869 1373. Maximum Sum BST in Binary Tree Hard 558 79
870 691. Stickers to Spell Word Hard 557 55
871 824. Goat Latin Easy 555 980
872 71. Simplify Path Medium 554 154
873 1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target Medium 553 11
874 1387. Sort Integers by The Power Value Medium 550 70
875 1300. Sum of Mutated Array Closest to Target Medium 548 72
876 817. Linked List Components Medium 548 1498
877 1375. Bulb Switcher III Medium 547 88
878 915. Partition Array into Disjoint Intervals Medium 546 39
879 1497. Check If Array Pairs Are Divisible by k Medium 545 47
880 1313. Decompress Run-Length Encoded List Easy 545 907
881 948. Bag of Tokens Medium 544 273
882 1464. Maximum Product of Two Elements in an Array Easy 543 96
883 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree Medium 537 716
884 732. My Calendar III Hard 534 127
885 262. Trips and Users Hard 534 377
886 902. Numbers At Most N Given Digit Set Hard 532 70
887 1125. Smallest Sufficient Team Hard 531 10
888 1156. Swap For Longest Repeated Character Substring Medium 529 52
889 830. Positions of Large Groups Easy 522 106
890 1518. Water Bottles Easy 521 43
891 911. Online Election Medium 521 427
892 996. Number of Squareful Arrays Hard 520 23
893 1331. Rank Transform of an Array Easy 518 41
894 468. Validate IP Address Medium 518 2091
895 1578. Minimum Deletion Cost to Avoid Repeating Letters Medium 517 25
896 1222. Queens That Can Attack the King Medium 517 101
897 1252. Cells with Odd Values in a Matrix Easy 517 843
898 1366. Rank Teams by Votes Medium 516 61
899 932. Beautiful Array Medium 512 619
900 833. Find And Replace in String Medium 510 577
901 593. Valid Square Medium 510 635
902 1509. Minimum Difference Between Largest and Smallest Value in Three Moves Medium 509 64
903 1287. Element Appearing More Than 25% In Sorted Array Easy 505 35
904 1544. Make The String Great Easy 503 45
905 352. Data Stream as Disjoint Intervals Hard 503 123
906 400. Nth Digit Medium 500 1282
907 1138. Alphabet Board Path Medium 499 118
908 1278. Palindrome Partitioning III Hard 498 11
909 956. Tallest Billboard Hard 497 19
910 365. Water and Jug Problem Medium 497 932
911 1478. Allocate Mailboxes Hard 496 8
912 919. Complete Binary Tree Inserter Medium 494 65
913 1217. Minimum Cost to Move Chips to The Same Position Easy 494 73
914 391. Perfect Rectangle Hard 494 90
915 913. Cat and Mouse Hard 494 93
916 1201. Ugly Number III Medium 494 316
917 850. Rectangle Area II Hard 493 34
918 1456. Maximum Number of Vowels in a Substring of Given Length Medium 490 27
919 1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Medium 488 42
920 1009. Complement of Base 10 Integer Easy 488 45
921 809. Expressive Words Medium 487 1191
922 447. Number of Boomerangs Medium 486 779
923 626. Exchange Seats Medium 485 316
924 1499. Max Value of Equation Hard 483 19
925 1419. Minimum Number of Frogs Croaking Medium 482 32
926 747. Largest Number At Least Twice of Others Easy 482 692
927 722. Remove Comments Medium 480 1287
928 1493. Longest Subarray of 1's After Deleting One Element Medium 478 10
929 949. Largest Time for Given Digits Medium 473 847
930 523. Continuous Subarray Sum Medium 472 86
931 641. Design Circular Deque Medium 469 48
932 869. Reordered Power of 2 Medium 469 155
933 1553. Minimum Number of Days to Eat N Oranges Hard 467 37
934 954. Array of Doubled Pairs Medium 467 65
935 1567. Maximum Length of Subarray With Positive Product Medium 465 7
936 781. Rabbits in Forest Medium 465 403
937 788. Rotated Digits Easy 464 1560
938 1526. Minimum Number of Increments on Subarrays to Form a Target Array Hard 462 31
939 1415. The k-th Lexicographical String of All Happy Strings of Length n Medium 460 15
940 1203. Sort Items by Groups Respecting Dependencies Hard 459 72
941 936. Stamping The Sequence Hard 459 114
942 1510. Stone Game IV Hard 457 27
943 1458. Max Dot Product of Two Subsequences Hard 456 10
944 1529. Bulb Switcher IV Medium 456 22
945 1361. Validate Binary Tree Nodes Medium 456 167
946 924. Minimize Malware Spread Hard 456 349
947 88. Merge Sorted Array Easy 454 62
948 710. Random Pick with Blacklist Hard 452 79
949 1208. Get Equal Substrings Within Budget Medium 450 34
950 1289. Minimum Falling Path Sum II Hard 449 48
951 1462. Course Schedule IV Medium 447 43
952 1460. Make Two Arrays Equal by Reversing Sub-arrays Easy 447 85
953 1524. Number of Sub-arrays With Odd Sum Medium 446 18
954 1394. Find Lucky Integer in an Array Easy 445 17
955 517. Super Washing Machines Hard 444 168
956 1187. Make Array Strictly Increasing Hard 443 11
957 848. Shifting Letters Medium 442 76
958 521. Longest Uncommon Subsequence I Easy 442 4900
959 440. K-th Smallest in Lexicographical Order Hard 438 64
960 8. String to Integer (atoi) Medium 438 1198
961 1481. Least Number of Unique Integers after K Removals Medium 437 45
962 761. Special Binary String Hard 437 146
963 233. Number of Digit One Hard 434 783
964 825. Friends Of Appropriate Ages Medium 432 869
965 1434. Number of Ways to Wear Different Hats to Each Other Hard 431 5
966 1349. Maximum Students Taking Exam Hard 431 10
967 1450. Number of Students Doing Homework at a Given Time Easy 428 109
968 1340. Jump Game V Hard 426 17
969 1400. Construct K Palindrome Strings Medium 426 50
970 1346. Check If N and Its Double Exist Easy 424 65
971 507. Perfect Number Easy 422 760
972 1018. Binary Prefix Divisible By 5 Easy 420 123
973 1233. Remove Sub-Folders from the Filesystem Medium 415 65
974 1297. Maximum Number of Occurrences of a Substring Medium 411 225
975 1494. Parallel Courses II Hard 410 34
976 1106. Parsing A Boolean Expression Hard 409 22
977 1003. Check If Word Is Valid After Substitutions Medium 406 403
978 1370. Increasing Decreasing String Easy 406 468
979 1502. Can Make Arithmetic Progression From Sequence Easy 405 33
980 1261. Find Elements in a Contaminated Binary Tree Medium 405 65
981 1413. Minimum Value to Get Positive Step by Step Sum Easy 404 123
982 1023. Camelcase Matching Medium 402 181
983 1072. Flip Columns For Maximum Number of Equal Rows Medium 400 32
984 1388. Pizza With 3n Slices Hard 399 5
985 1392. Longest Happy Prefix Hard 399 20
986 1184. Distance Between Bus Stops Easy 398 46
987 1115. Print FooBar Alternately Medium 397 30
988 1269. Number of Ways to Stay in the Same Place After Some Steps Hard 396 24
989 1177. Can Make Palindrome from Substring Medium 395 201
990 1170. Compare Strings by Frequency of the Smallest Character Medium 393 828
991 598. Range Addition II Easy 392 633
992 756. Pyramid Transition Matrix Medium 391 393
993 1015. Smallest Integer Divisible by K Medium 391 397
994 903. Valid Permutations for DI Sequence Hard 386 33
995 1542. Find Longest Awesome Substring Hard 383 8
996 1328. Break a Palindrome Medium 383 336
997 1391. Check if There is a Valid Path in a Grid Medium 382 192
998 564. Find the Closest Palindrome Hard 382 1009
999 1449. Form Largest Integer With Digits That Add up to Target Hard 379 6
1000 1541. Minimum Insertions to Balance a Parentheses String Medium 378 80
1001 620. Not Boring Movies Easy 378 340
1002 1275. Find Winner on a Tic Tac Toe Game Easy 377 115
1003 1422. Maximum Score After Splitting a String Easy 376 21
1004 757. Set Intersection Size At Least Two Hard 376 47
1005 1473. Paint House III Hard 375 20
1006 1537. Get the Maximum Score Hard 373 26
1007 851. Loud and Rich Medium 371 369
1008 1535. Find the Winner of an Array Game Medium 370 24
1009 900. RLE Iterator Medium 370 112
1010 1408. String Matching in an Array Easy 368 64
1011 1566. Detect Pattern of Length M Repeated K or More Times Easy 367 55
1012 1492. The kth Factor of n Medium 365 145
1013 420. Strong Password Checker Hard 364 1042
1014 1520. Maximum Number of Non-Overlapping Substrings Hard 363 48
1015 1260. Shift 2D Grid Easy 363 126
1016 893. Groups of Special-Equivalent Strings Easy 363 1333
1017 955. Delete Columns to Make Sorted II Medium 362 56
1018 1255. Maximum Score Words Formed by Letters Hard 361 28
1019 1496. Path Crossing Easy 360 7
1020 1128. Number of Equivalent Domino Pairs Easy 360 181
1021 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence Easy 359 13
1022 1579. Remove Max Number of Edges to Keep Graph Fully Traversable Hard 358 3
1023 1263. Minimum Moves to Move a Box to Their Target Location Hard 358 20
1024 1433. Check If a String Can Break Another String Medium 357 94
1025 1562. Find Latest Group of Size M Medium 356 80
1026 891. Sum of Subsequence Widths Hard 356 119
1027 427. Construct Quad Tree Medium 356 522
1028 699. Falling Squares Hard 355 66
1029 1139. Largest 1-Bordered Square Medium 355 67
1030 1508. Range Sum of Sorted Subarray Sums Medium 355 70
1031 1359. Count All Valid Pickup and Delivery Options Hard 354 43
1032 423. Reconstruct Original Digits from English Medium 354 1045
1033 649. Dota2 Senate Medium 353 268
1034 885. Spiral Matrix III Medium 353 424
1035 504. Base 7 Easy 352 171
1036 1131. Maximum of Absolute Value Expression Medium 352 277
1037 1513. Number of Substrings With Only 1s Medium 351 17
1038 1178. Number of Valid Words for Each Puzzle Hard 350 36
1039 1163. Last Substring in Lexicographical Order Hard 350 379
1040 762. Prime Number of Set Bits in Binary Representation Easy 350 413
1041 999. Available Captures for Rook Easy 350 520
1042 1404. Number of Steps to Reduce a Number in Binary Representation to One Medium 349 26
1043 1240. Tiling a Rectangle with the Fewest Squares Hard 349 336
1044 1157. Online Majority Element In Subarray Hard 346 39
1045 1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix Hard 345 36
1046 497. Random Point in Non-overlapping Rectangles Medium 345 543
1047 736. Parse Lisp Expression Hard 344 255
1048 908. Smallest Range I Easy 344 1412
1049 372. Super Pow Medium 343 930
1050 960. Delete Columns to Make Sorted III Hard 341 9
1051 892. Surface Area of 3D Shapes Easy 340 491
1052 1444. Number of Ways of Cutting a Pizza Hard 339 8
1053 1451. Rearrange Words in a Sentence Medium 338 56
1054 858. Mirror Reflection Medium 338 676
1055 879. Profitable Schemes Hard 335 35
1056 561. Array Partition I Easy 332 68
1057 984. String Without AAA or BBB Medium 332 299
1058 1561. Maximum Number of Coins You Can Get Medium 331 61
1059 1030. Matrix Cells in Distance Order Easy 331 163
1060 434. Number of Segments in a String Easy 330 892
1061 1491. Average Salary Excluding the Minimum and Maximum Salary Easy 329 64
1062 868. Binary Gap Easy 329 567
1063 1420. Build Array Where You Can Find The Maximum Exactly K Comparisons Hard 327 8
1064 927. Three Equal Parts Hard 327 67
1065 537. Complex Number Multiplication Medium 327 855
1066 1531. String Compression II Hard 324 32
1067 1036. Escape a Large Maze Hard 324 121
1068 928. Minimize Malware Spread II Hard 322 63
1069 1559. Detect Cycles in 2D Grid Hard 320 9
1070 883. Projection Area of 3D Shapes Easy 320 1014
1071 478. Generate Random Point in a Circle Medium 318 617
1072 1441. Build an Array With Stack Operations Easy 317 553
1073 661. Image Smoother Easy 314 1332
1074 806. Number of Lines To Write String Easy 313 1010
1075 326. Power of Three Easy 312 42
1076 393. UTF-8 Validation Medium 312 1310
1077 1536. Minimum Swaps to Arrange a Binary Grid Medium 311 54
1078 878. Nth Magical Number Hard 311 72
1079 596. Classes More Than 5 Students Easy 311 806
1080 1012. Numbers With Repeated Digits Hard 310 55
1081 492. Construct the Rectangle Easy 307 296
1082 1417. Reformat The String Easy 306 61
1083 640. Solve the Equation Medium 306 612
1084 149. Max Points on a Line Hard 304 76
1085 1437. Check If All 1's Are at Least Length K Places Away Easy 304 186
1086 966. Vowel Spellchecker Medium 304 663
1087 385. Mini Parser Medium 303 1007
1088 1573. Number of Ways to Split a String Medium 300 47
1089 1001. Grid Illumination Hard 300 85
1090 587. Erect the Fence Hard 299 204
1091 1147. Longest Chunked Palindrome Decomposition Hard 298 19
1092 1471. The k Strongest Values in an Array Medium 298 78
1093 488. Zuma Game Hard 298 329
1094 1096. Brace Expansion II Hard 294 174
1095 794. Valid Tic-Tac-Toe State Medium 294 811
1096 1386. Cinema Seat Allocation Medium 293 172
1097 1179. Reformat Department Table Easy 291 218
1098 1318. Minimum Flips to Make a OR b Equal to c Medium 290 30
1099 1324. Print Words Vertically Medium 290 78
1100 1534. Count Good Triplets Easy 288 688
1101 1558. Minimum Numbers of Function Calls to Make Target Array Medium 287 16
1102 1080. Insufficient Nodes in Root to Leaf Paths Medium 285 400
1103 1227. Airplane Seat Assignment Probability Medium 284 520
1104 998. Maximum Binary Tree II Medium 283 545
1105 1519. Number of Nodes in the Sub-Tree With the Same Label Medium 278 272
1106 906. Super Palindromes Hard 278 357
1107 798. Smallest Rotation with Highest Score Hard 277 18
1108 1576. Replace All ?'s to Avoid Consecutive Repeating Characters Easy 277 119
1109 1363. Largest Multiple of Three Hard 275 43
1110 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Medium 275 46
1111 192. Word Frequency Medium 275 191
1112 1224. Maximum Equal Frequency Hard 274 30
1113 1206. Design Skiplist Hard 273 33
1114 899. Orderly Queue Hard 273 232
1115 1195. Fizz Buzz Multithreaded Medium 272 203
1116 1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Hard 271 35
1117 944. Delete Columns to Make Sorted Easy 271 1893
1118 1117. Building H2O Medium 268 77
1119 1416. Restore The Array Hard 267 8
1120 812. Largest Triangle Area Easy 267 1173
1121 1017. Convert to Base -2 Medium 266 196
1122 874. Walking Robot Simulation Easy 266 1042
1123 1078. Occurrences After Bigram Easy 265 258
1124 1237. Find Positive Integer Solution for a Given Equation Medium 262 975
1125 1330. Reverse Subarray To Maximize Array Value Hard 261 30
1126 866. Prime Palindrome Medium 261 662
1127 1116. Print Zero Even Odd Medium 259 177
1128 601. Human Traffic of Stadium Hard 257 435
1129 1503. Last Moment Before All Ants Fall Out of a Plank Medium 256 157
1130 1040. Moving Stones Until Consecutive II Medium 256 441
1131 1575. Count All Possible Routes Hard 254 12
1132 1545. Find Kth Bit in Nth Binary String Medium 254 22
1133 1172. Dinner Plate Stacks Hard 253 38
1134 1550. Three Consecutive Odds Easy 253 39
1135 1403. Minimum Subsequence in Non-Increasing Order Easy 252 309
1136 1409. Queries on a Permutation With Key Medium 252 440
1137 1563. Stone Game V Hard 249 51
1138 592. Fraction Addition and Subtraction Medium 246 379
1139 1487. Making File Names Unique Medium 246 394
1140 748. Shortest Completing Word Easy 245 743
1141 1377. Frog Position After T Seconds Hard 243 76
1142 1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits Hard 242 14
1143 963. Minimum Area Rectangle II Medium 242 337
1144 1569. Number of Ways to Reorder Array to Get Same BST Hard 241 35
1145 1476. Subrectangle Queries Medium 241 661
1146 1556. Thousand Separator Easy 240 8
1147 1523. Count Odd Numbers in an Interval Range Easy 238 26
1148 793. Preimage Size of Factorial Zeroes Function Hard 238 64
1149 789. Escape The Ghosts Medium 238 381
1150 1307. Verbal Arithmetic Puzzle Hard 236 67
1151 522. Longest Uncommon Subsequence II Medium 236 693
1152 466. Count The Repetitions Hard 235 216
1153 1253. Reconstruct a 2-Row Binary Matrix Medium 234 19
1154 1540. Can Convert String in K Moves Medium 234 179
1155 519. Random Flip Matrix Medium 230 80
1156 1301. Number of Paths with Max Score Hard 224 14
1157 816. Ambiguous Coordinates Medium 223 536
1158 1568. Minimum Number of Days to Disconnect Island Hard 221 102
1159 1034. Coloring A Border Medium 221 405
1160 964. Least Operators to Express Number Hard 220 56
1161 1374. Generate a String With Characters That Have Odd Counts Easy 220 836
1162 1521. Find a Value of a Mysterious Function Closest to Target Hard 219 8
1163 1111. Maximum Nesting Depth of Two Valid Parentheses Strings Medium 218 984
1164 483. Smallest Good Base Hard 217 381
1165 193. Valid Phone Numbers Easy 214 585
1166 1090. Largest Values From Labels Medium 213 480
1167 808. Soup Servings Medium 212 652
1168 384. Shuffle an Array Medium 208 249
1169 553. Optimal Division Medium 208 1245
1170 840. Magic Squares In Grid Medium 208 1385
1171 882. Reachable Nodes In Subdivided Graph Hard 204 162
1172 1144. Decrease Elements To Make Array Zigzag Medium 203 127
1173 195. Tenth Line Easy 200 282
1174 1399. Count Largest Group Easy 199 548
1175 1397. Find All Good Strings Hard 198 90
1176 496. Next Greater Element I Easy 196 17
1177 1385. Find the Distance Value Between Two Arrays Easy 193 839
1178 335. Self Crossing Hard 192 419
1179 1016. Binary String With Substrings Representing 1 To N Medium 189 418
1180 1317. Convert Integer to the Sum of Two No-Zero Integers Easy 187 183
1181 1452. People Whose List of Favorite Companies Is Not a Subset of Another List Medium 184 173
1182 1169. Invalid Transactions Medium 184 1067
1183 65. Valid Number Hard 182 364
1184 1401. Circle and Rectangle Overlapping Medium 180 48
1185 1185. Day of the Week Easy 180 1600
1186 672. Bulb Switcher II Medium 178 1010
1187 1175. Prime Arrangements Easy 177 304
1188 1037. Valid Boomerang Easy 171 306
1189 982. Triples with Bitwise AND Equal To Zero Hard 170 165
1190 1154. Day of the Year Easy 170 239
1191 1577. Number of Ways Where Square of Number Is Equal to Product of Two Numbers Medium 169 38
1192 1073. Adding Two Negabinary Numbers Medium 169 75
1193 1447. Simplified Fractions Medium 167 29
1194 970. Powerful Integers Medium 167 56
1195 1210. Minimum Moves to Reach Target with Rotations Hard 165 51
1196 1467. Probability of a Two Boxes Having The Same Number of Distinct Balls Hard 165 126
1197 1333. Filter Restaurants by Vegan-Friendly, Price and Distance Medium 164 144
1198 1276. Number of Burgers with No Waste of Ingredients Medium 164 168
1199 1238. Circular Permutation in Binary Representation Medium 163 139
1200 1250. Check If It Is a Good Array Hard 159 226
1201 782. Transform to Chessboard Hard 158 161
1202 1311. Get Watched Videos by Your Friends Medium 158 249
1203 749. Contain Virus Hard 155 326
1204 1507. Reformat Date Easy 152 231
1205 1560. Most Visited Sector in a Circular Track Easy 145 333
1206 1226. The Dining Philosophers Medium 137 154
1207 1298. Maximum Candies You Can Get from Boxes Hard 136 102
1208 1418. Display Table of Food Orders in a Restaurant Medium 136 266
1209 457. Circular Array Loop Medium 135 118
1210 481. Magical String Medium 134 790
1211 1051. Height Checker Easy 133 20
1212 1006. Clumsy Factorial Medium 132 185
1213 1515. Best Position for a Service Centre Hard 126 167
1214 1362. Closest Divisors Medium 123 72
1215 1390. Four Divisors Medium 123 128
1216 1316. Distinct Echo Substrings Hard 118 141
1217 1033. Moving Stones Until Consecutive Easy 118 545
1218 1360. Number of Days Between Two Dates Easy 117 576
1219 558. Logical OR of Two Binary Grids Represented as Quad-Trees Medium 115 373
1220 1432. Max Difference You Can Get From Changing an Integer Medium 113 153
1221 591. Tag Validator Hard 111 488
1222 1410. HTML Entity Parser Medium 107 234
1223 479. Largest Palindrome Product Hard 104 1390
1224 831. Masking Personal Information Medium 99 368
1225 1453. Maximum Number of Darts Inside of a Circular Dartboard Hard 96 219
1226 551. Student Attendance Record I Easy 95 9
1227 770. Basic Calculator IV Hard 95 922
1228 822. Card Flipping Game Medium 90 552
1229 904. Fruit Into Baskets Medium 86 5
1230 810. Chalkboard XOR Game Hard 86 215
1231 506. Relative Ranks Easy 84 3
1232 1357. Apply Discount Every n Orders Medium 82 136
1233 194. Transpose File Medium 82 217
1234 1332. Remove Palindromic Subsequences Easy 70 140
1235 1053. Previous Permutation With One Swap Medium 65 8
1236 495. Teemo Attacking Easy 61 7
1237 972. Equal Rational Numbers Hard 58 164
1238 1348. Tweet Counts Per Frequency Medium 44 83
1239 655. Print Binary Tree Medium 26 32
1240 909. Snakes and Ladders Medium 20 2
1241 1093. Statistics from a Large Sample Medium 20 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment