1774 |
Closest Dessert Cost |
Python3 |
Medium |
Greedy |
1773 |
Count Items Matching a Rule |
Python3 |
Easy |
Array, String |
1758 |
Minimum Changes To Make Alternating Binary String |
Python3 |
Easy |
Greedy, Array |
1752 |
Check if Array Is Sorted and Rotated |
Python3 |
Easy |
Array |
1748 |
Sum of Unique Elements |
Python3 |
Easy |
Array, Hash Table |
1742 |
Maximum Number of Balls in a Box |
Python3 |
Easy |
Array |
1736 |
Latest Time by Replacing Hidden Digits |
Python3 |
Easy |
Greedy, String |
1732 |
Find the Highest Altitude |
Python3 |
Easy |
Array |
1725 |
Number Of Rectangles That Can Form The Largest Square |
Python3 |
Easy |
Greedy |
1720 |
Decode XORed Array |
Python3 |
Easy |
Bit Manipulation |
1716 |
Calculate Money in Leetcode Bank |
Python3 |
Easy |
Greedy, Math |
1710 |
Maximum Units on a Truck |
Python3 |
Easy |
Greedy, Sort |
1704 |
Determine if String Halves Are Alike |
Python3 |
Easy |
String |
1700 |
Number of Students Unable to Eat Lunch |
Python3 |
Easy |
Array |
1694 |
Reformat Phone Number |
Python3 |
Easy |
String |
1688 |
Count of Matches in Tournament |
Python3 |
Easy |
Backtracking |
1684 |
Count the Number of Consistent Strings |
Python3 |
Easy |
String |
1678 |
Goal Parser Interpretation |
Python3 |
Easy |
String |
1672 |
Richest Customer Wealth |
Python3 |
Easy |
Array |
1668 |
Maximum Repeating Substring |
Python3 |
Easy |
String |
1662 |
Check If Two String Arrays are Equivalent |
Python3 |
Easy |
String |
1656 |
Design an Ordered Stream |
Python3 |
Easy |
Design, Array |
1652 |
Defuse the Bomb |
Python3 |
Easy |
Array |
1646 |
Get Maximum in Generated Array |
Python3 |
Easy |
Array |
1640 |
Check Array Formation Through Concatenation |
Python3 |
Easy |
Sort, Array, Hash Table |
1636 |
Sort Array by Increasing Frequency |
Python3 |
Easy |
Sort, Array |
1629 |
Slowest Key |
Python3 |
Easy |
Array |
1624 |
Largest Substring Between Two Equal Characters |
Python3 |
Easy |
String |
1619 |
Mean of Array After Removing Some Elements |
Python3 |
Easy |
Array |
1614 |
Maximum Nesting Depth of the Parentheses |
Python3 |
Easy |
String |
1608 |
Special Array With X Elements Greater Than or Equal X |
Python3 |
Easy |
Array |
1603 |
Design Parking System |
Python3 |
Easy |
Design |
1598 |
Crawler Log Folder |
Python3 |
Easy |
Stack |
1592 |
Rearrange Spaces Between Words |
Python3 |
Easy |
String |
1588 |
Sum of All Odd Length Subarrays |
Python3 |
Easy |
Array |
1582 |
Special Positions in a Binary Matrix |
Python3 |
Easy |
Array |
1576 |
Replace All ?'s to Avoid Consecutive Repeating Characters |
Python3 |
Easy |
String |
1572 |
Matrix Diagonal Sum |
Python3 |
Easy |
Array |
1566 |
Detect Pattern of Length M Repeated K or More Times |
Python3 |
Easy |
Array |
1560 |
Most Visited Sector in a Circular Track |
Python3 |
Easy |
Array |
1556 |
Thousand Separator |
Python3 |
Easy |
String |
1550 |
Three Consecutive Odds |
Python3 |
Easy |
Array |
1544 |
Make The String Great |
Python3 |
Easy |
Stack, String |
1539 |
Kth Missing Positive Number |
Python3 |
Easy |
Array, Hash Table |
1534 |
Count Good Triplets |
Python3 |
Easy |
Array |
1528 |
Shuffle String |
Python3 |
Easy |
Sort |
1523 |
Count Odd Numbers in an Interval Range |
Python3 |
Easy |
Math |
1518 |
Water Bottles |
Python3 |
Easy |
Greedy |
1512 |
Number of Good Pairs |
Python3 |
Easy |
Array, Hash Table, Math |
1507 |
Reformat Date |
Python3 |
Easy |
String |
1502 |
Can Make Arithmetic Progression From Sequence |
Python3 |
Easy |
Sort, Array |
1496 |
Path Crossing |
Python3 |
Easy |
String |
1491 |
Average Salary Excluding the Minimum and Maximum Salary |
Python3 |
Easy |
Sort, Array |
1486 |
XOR Operation in an Array |
Python3 |
Easy |
Bit Manipulation, Array |
1480 |
Running Sum of 1d Array |
Python3 |
Easy |
Array |
1475 |
Final Prices With a Special Discount in a Shop |
Python3 |
Easy |
Array |
1470 |
Shuffle the Array |
Python3 |
Easy |
Array |
1464 |
Maximum Product of Two Elements in an Array |
Python3 |
Easy |
Array |
1460 |
Make Two Arrays Equal by Reversing Sub-arrays |
Python3 |
Easy |
Array |
1455 |
Check If a Word Occurs As a Prefix of Any Word in a Sentence |
Python3 |
Easy |
String |
1450 |
Number of Students Doing Homework at a Given Time |
Python3 |
Easy |
Array |
1446 |
Consecutive Characters |
Python3 |
Easy |
String |
1441 |
Build an Array With Stack Operations |
Python3 |
Easy |
Stack |
1436 |
Destination City |
Python3 |
Easy |
String |
1431 |
Kids With the Greatest Number of Candies |
Python3 |
Easy |
Array |
1422 |
Maximum Score After Splitting a String |
Python3 |
Easy |
String |
1417 |
Reformat The String |
Python3 |
Easy |
String |
1413 |
Minimum Value to Get Positive Step by Step Sum |
Python3 |
Easy |
Array |
1408 |
String Matching in an Array |
Python3 |
Easy |
String |
1403 |
Minimum Subsequence in Non-Increasing Order |
Python3 |
Easy |
Greedy, Sort |
1399 |
Count Largest Group |
Python3 |
Easy |
Array |
1394 |
Find Lucky Integer in an Array |
Python3 |
Easy |
Array |
1389 |
Create Target Array in the Given Order |
Python3 |
Easy |
Array |
1385 |
Find the Distance Value Between Two Arrays |
Python3 |
Easy |
Array |
1380 |
Lucky Numbers in a Matrix |
Python3 |
Easy |
Array |
1374 |
Generate a String With Characters That Have Odd Counts |
Python3 |
Easy |
String |
1370 |
Increasing Decreasing String |
Python3 |
Easy |
Sort, String |
1365 |
How Many Numbers Are Smaller Than the Current Number |
Python3 |
Easy |
Array, Hash Table |
1360 |
Number of Days Between Two Dates |
Python3 |
Easy |
None |
1356 |
Sort Integers by The Number of 1 Bits |
Python3 |
Easy |
Sort, Bit Manipulation |
1351 |
Count Negative Numbers in a Sorted Matrix |
Python3 |
Easy |
Array, Binary Search |
1346 |
Check If and Its Double Exist |
Python3 |
Easy |
Array |
1342 |
Number of Steps to Reduce a Number to Zero |
Python3 |
Easy |
Bit Manipulation |
1337 |
The K Weakest Rows in a Matrix |
Python3 |
Easy |
Array, Binary Search |
1332 |
Remove Palindromic Subsequences |
Python3 |
Easy |
String |
1331 |
Rank Transform of an Array |
Python3 |
Easy |
Array |
1323 |
Maximum 69 Number |
Python3 |
Easy |
Math |
1317 |
Convert Integer to the Sum of Two No-Zero Integers |
Python3 |
Easy |
Math |
1313 |
Decompress Run-Length Encoded List |
Python3 |
Easy |
Array |
1309 |
Decrypt String from Alphabet to Integer Mapping |
Python3 |
Easy |
String |
1304 |
Find N Unique Integers Sum up to Zero |
Python3 |
Easy |
Array |
1299 |
Replace Elements with Greatest Element on Right Side |
Python3 |
Easy |
Array |
1295 |
Find Numbers with Even Number of Digits |
Python3 |
Easy |
Array |
1290 |
Convert Binary Number in a Linked List to Integer |
Python3 |
Easy |
Bit Manipulation, Linked List |
1287 |
Element Appearing More Than 25% In Sorted Array |
Python3 |
Easy |
Array |
1281 |
Subtract the Product and Sum of Digits of an Integer |
Python3 |
Easy |
Math |
1275 |
Find Winner on a Tic Tac Toe Game |
Python3 |
Easy |
Array |
1266 |
Minimum Time Visiting All Points |
Python3 |
Easy |
Geometry, Array |
1260 |
Shift 2D Grid |
Python3 |
Easy |
Array |
1252 |
Cells with Odd Values in a Matrix |
Python3 |
Easy |
Array |
1237 |
Find Positive Integer Solution for a Given Equation |
Python3 |
Easy |
Math, Binary Search |
1232 |
Check If It a Straight Line |
Python3 |
Easy |
Geometry, Array, Math |
1221 |
Split a String in Balanced Strings |
Python3 |
Easy |
Greedy, String |
1217 |
Minimum Cost to Move Chips to The Same Position |
Python3 |
Easy |
Greedy, Array, Math |
1207 |
Unique Number of Occurrences |
Python3 |
Easy |
Hash Table |
1200 |
Minimum Absolute Difference |
Python3 |
Easy |
Array |
1189 |
Maximum Number of Balloons |
Python3 |
Easy |
Hash Table, String |
1185 |
Day of the Week |
Python3 |
Easy |
Array |
1184 |
Distance Between Bus Stops |
Python3 |
Easy |
Array |
1175 |
Prime Arrangements |
Python3 |
Easy |
Math |
1170 |
Compare Strings by Frequency of the Smallest Character |
Python3 |
Easy |
Array, String |
1160 |
Find Words That Can Be Formed by Characters |
Python3 |
Easy |
Array, Hash Table |
1154 |
Day of the Year |
Python3 |
Easy |
Math |
1137 |
N-th Tribonacci Number |
Python3 |
Easy |
Recursion |
1128 |
Number of Equivalent Domino Pairs |
Python3 |
Easy |
Array |
1122 |
Relative Sort Array |
Python3 |
Easy |
Sort, Array |
1108 |
Defanging an IP Address |
Python3 |
Easy |
String |
1103 |
Distribute Candies to People |
Python3 |
Easy |
Math |
1089 |
Duplicate Zeros |
Python3 |
Easy |
Array |
1078 |
Occurrences After Bigram |
Python3 |
Easy |
Hash Table |
1071 |
Greatest Common Divisor of Strings |
Python3 |
Easy |
String |
1051 |
Height Checker |
Python3 |
Easy |
Array |
1047 |
Remove All Adjacent Duplicates In String |
Python3 |
Easy |
Stack |
1046 |
Last Stone Weight |
Python3 |
Easy |
Heap, Greedy |
1037 |
Valid Boomerang |
Python3 |
Easy |
Math |
1033 |
Moving Stones Until Consecutive |
Python3 |
Easy |
Brainteaser |
1030 |
Matrix Cells in Distance Order |
Python3 |
Easy |
Sort |
1025 |
Divisor Game |
Python3 |
Easy |
Math, Dynamic Programming |
1022 |
Sum of Root To Leaf Binary Numbers |
Python3 |
Easy |
Tree |
1021 |
Remove Outermost Parentheses |
Python3 |
Easy |
Stack |
1018 |
Binary Prefix Divisible by 5 |
Python3 |
Easy |
Array |
1013 |
Partition Array Into Three Parts With Equal Sum |
Python3 |
Easy |
Array |
1010 |
Pairs of Songs With Total Durations Divisible by 60 |
Python3 |
Easy |
Array |
1009 |
Complement of Base 10 Integer |
Python3 |
Easy |
Math |
1005 |
Maximize Sum of Array After K Negations |
Python3 |
Easy |
Greedy |
1002 |
Find Common Characters |
Python3 |
Easy |
Array, Hash Table |
999 |
Available Captures for Rook |
Python3 |
Easy |
Array |
997 |
Find the Town Judge |
Python3 |
Easy |
Graph |
993 |
Cousins in Binary Tree |
Python3 |
Easy |
Tree, Breadth-first Search |
989 |
Add to Array-Form of Integer |
Python3 |
Easy |
Array |
985 |
Sum of Even Numbers After Queries |
Python3 |
Easy |
Array |
977 |
Squares of a Sorted Array |
Python3 |
Easy |
Array, Two Pointers |
976 |
Largest Perimeter Triangle |
Python3 |
Easy |
Sort, Math |
970 |
Powerful Integers |
Python3 |
Easy |
Hash Table, Math |
965 |
Univalued Binary Tree |
Python3 |
Easy |
Tree |
961 |
N-repeated Element in Size 2N Array |
Python3 |
Easy |
Hash Table |
953 |
Verifying an Alien Dictionary |
Python3 |
Easy |
Hash Table |
944 |
Delete Columns to Make Sorted |
Python3 |
Easy |
Greedy |
942 |
DI String Match |
Python3 |
Easy |
Math |
941 |
Valid Mountain Array |
Python3 |
Easy |
Array |
938 |
Range Sum of BST |
Python3 |
Easy |
Tree, Recursion |
937 |
Reorder Data in Log Files |
Python3 |
Easy |
String |
933 |
Number of Recent Calls |
Python3 |
Easy |
Queue |
929 |
Unique Email Addresses |
Python3 |
Easy |
String |
925 |
Long Pressed Name |
Python3 |
Easy |
Two Pointers, String |
922 |
Sort Array By Parity II |
Python3 |
Easy |
Sort, Array |
917 |
Reverse Only Letters |
Python3 |
Easy |
String |
914 |
X of a Kind in a Deck of Cards |
Python3 |
Easy |
Array, Math |
908 |
Smallest Range I |
Python3 |
Easy |
Math |
905 |
Sort Array by Parity |
Python3 |
Easy |
Array |
897 |
Increasing Order Search Tree |
Python3 |
Easy |
Tree, Depth-first Search |
896 |
Monotonic Array |
Python3 |
Easy |
Array |
893 |
Groups of Special-Equivalent Strings |
Python3 |
Easy |
String |
892 |
Surface Area of 3D Shapes |
Python3 |
Easy |
Geometry, Math |
888 |
Fair Candy Swap |
Python3 |
Easy |
Array |
884 |
Uncommon Words from Two Sentences |
Python3 |
Easy |
Hash Table |
883 |
Projection Area of 3D shapes |
Python3 |
Easy |
Math |
876 |
Middle of the Linked List |
Python3 |
Easy |
Linked List |
874 |
Walking Robot Simulation |
Python3 |
Easy |
Greedy |
872 |
Leaf-Similar Tree |
Python3 |
Easy |
Tree, Depth-first Search |
868 |
Binary Gap |
Python3 |
Easy |
Math |
867 |
Transpose Matrix |
Python3 |
Easy |
Array |
860 |
Lemonade Change |
Python3 |
Easy |
Greedy |
859 |
Buddy Strings |
Python3 |
Easy |
String |
852 |
Peak Index in a Mountain Array |
Python3 |
Easy |
Binary Search |
844 |
Backspace String Compare |
Python3 |
Easy |
Stack, Two Pointers |
836 |
Rectangle Overlap |
Python3 |
Easy |
Math |
832 |
Flipping an Image |
Python3 |
Easy |
Array |
830 |
Position of Large Groups |
Python3 |
Easy |
Array |
824 |
Goat Latin |
Python3 |
Easy |
String |
821 |
Shortest Distance to a Character |
Python3 |
Easy |
None |
819 |
Most Common Word |
Python3 |
Easy |
String |
812 |
Largest Triangle Area |
Python3 |
Easy |
Math |
811 |
Subdomain Visit Count |
Python3 |
Easy |
Hash Table |
806 |
Number of Lines To Write String |
Python3 |
Easy |
None |
804 |
Unique Morse Code Words |
Python3 |
Easy |
String |
796 |
Rotate String |
Python3 |
Easy |
None |
788 |
Rotated Digits |
Python3 |
Easy |
String |
783 |
Minimum Distance Between BST Nodes |
Python3 |
Easy |
Tree, Recursion |
771 |
Jewels and Stones |
Python3 |
Easy |
Hash Table |
766 |
Toeplitz Matrix |
Python3 |
Easy |
Array |
762 |
Prime Number of Set Bits in Binary Representation |
Python3 |
Easy |
Bit Manipulation |
748 |
Shortest Completing Word |
Python3 |
Easy |
Hash Table |
747 |
Largest Number At Least Twice of Others |
Python3 |
Easy |
Array |
746 |
Min Cost Climbing Stairs |
Python3 |
Easy |
Array, Dynamic Programming |
744 |
Find Smallest Letter Greater Than Target |
Python3 |
Easy |
Binary Search |
733 |
Flood Fill |
Python3 |
Easy |
Depth-first Search |
728 |
Self Dividing Numbers |
Python3 |
Easy |
Math |
724 |
Find Pivot Index |
Python3 |
Easy |
Array |
720 |
Longest Word in Dictionary |
Python3 |
Easy |
Trie, Hash Table |
717 |
1-bit and 2-bit Characters |
Python3 |
Easy |
Array |
709 |
To Lower Case |
Python3 |
Easy |
String |
706 |
Design HashMap |
Python3 |
Easy |
Design, Hash Table |
705 |
Design HashSet |
Python3 |
Easy |
Design, Hash Table |
704 |
Binary Search |
Python3 |
Easy |
Binary Search |
703 |
Kth Largest Element in a Stream |
Python3 |
Easy |
Heap |
700 |
Search in a Binary Search Tree |
Python3 |
Easy |
Tree |
697 |
Degree of an Array |
Python3 |
Easy |
Array |
696 |
Count Binary Substrings |
Python3 |
Easy |
String |
693 |
Binary Number with Alternating bits |
Python3 |
Easy |
Bit Manipulation |
690 |
Employee Importance |
Python3 |
Easy |
Depth-first Search, Breadth-first Search, Hash Table |
687 |
Longest Univalue Path |
Python3 |
Easy |
Tree, Recursion |
686 |
Repeated String Match |
Python3 |
Easy |
String |
682 |
Baseball Game |
Python3 |
Easy |
Stack |
680 |
Valid Palindrome II |
Python3 |
Easy |
String |
674 |
Longest Continuous Increasing Subsequence |
Python3 |
Easy |
Array |
671 |
Second Minimum Node in a Binary Tree |
Python3 |
Easy |
Tree |
669 |
Trim a Binary Search Tree |
Python3 |
Easy |
Tree |
665 |
Non-decreasing Array |
Python3 |
Easy |
Array |
661 |
Image Smoother |
Python3 |
Easy |
Array |
657 |
Robot Return to Origin |
Python3 |
Easy |
String |
653 |
Two Sum IV - Input is a BST |
Python3 |
Easy |
Tree |
645 |
Set Mismatch |
Python3 |
Easy |
Hash Table, Math |
643 |
Maximum Average Subarray I |
Python3 |
Easy |
Array |
637 |
Average of Levels in Binary Tree |
Python3 |
Easy |
Tree |
633 |
Sum of Square Numbers |
Python3 |
Easy |
Math |
628 |
Maximum Product of Three Numbers |
Python3 |
Easy |
Array, Math |
621 |
Task Scheduler |
Java |
中等 |
贪心, 数组, 哈希表, 计数, 排序, 堆(优先队列) |
617 |
Merge Two Binary Trees |
Python3 |
Easy |
Tree |
606 |
Construct String from Binary Tree |
Python3 |
Easy |
Tree, String |
605 |
Can Place Flowers |
Python3 |
Easy |
Array |
599 |
Minimum Index Sum of Two Lists |
Python3 |
Easy |
Hash Table |
598 |
Range Addition II |
Python3 |
Easy |
Math |
594 |
Longest Harmonious Subsequence |
Python3 |
Easy |
Hash Table |
590 |
N-ary Tree Postorder Traversal |
Python3 |
Easy |
Tree |
589 |
N-ary Tree Preorder Traversal |
Python3 |
Easy |
Tree |
581 |
Shortest Unsorted Continuous Subarray |
Python3 |
Easy |
Array |
575 |
Distribute Candies |
Python3 |
Easy |
Hash Table |
572 |
Subtree of Another Tree |
Python3 |
Easy |
Tree |
566 |
Reshape the Matrix |
Python3 |
Easy |
Array |
563 |
Binary Tree Tilt |
Python3 |
Easy |
Tree |
561 |
Array Partition I |
Python3 |
Easy |
Array |
559 |
Maximum Depth of N-ary Tree |
Python3 |
Easy |
Tree, Depth-first Search, Breadth-first Search |
557 |
Reverse Words in a String III |
Python3 |
Easy |
String |
551 |
Student Attendance Record I |
Python3 |
Easy |
Tree |
543 |
Diameter of Binary Tree |
Python3 |
Easy |
Tree |
541 |
Reverse String II |
Python3 |
Easy |
String |
538 |
Convert BST to Greater Tree |
Python3 |
Easy |
Tree |
532 |
K-diff Pairs in an Array |
Python3 |
Easy |
Array, Two Pointers |
530 |
Minimum Absolute Difference in BST |
Python3 |
Easy |
Tree |
521 |
Longest Uncommon Subsequence I |
Python3 |
Easy |
String |
520 |
Detect Capital |
Python3 |
Easy |
String |
509 |
Fibonacci Number |
Python3 |
Easy |
Array |
507 |
Perfect Number |
Python3 |
Easy |
Math |
506 |
Relative Ranks |
Python3 |
Easy |
None |
504 |
Base 7 |
Python3 |
Easy |
None |
501 |
Find Mode in Binary Search Tree |
Python3 |
Easy |
Tree |
500 |
Keyboard Row |
Python3 |
Easy |
Hash Table |
496 |
Next Greater Element I |
Python3 |
Easy |
Stack |
492 |
Construct the Rectangle |
Python3 |
Easy |
None |
485 |
Max Consecutive Ones |
Python3 |
Easy |
Array |
482 |
License Key Formatting |
Python3 |
Easy |
None |
476 |
Number Complement |
Python3 |
Easy |
Bit Manipulation |
475 |
Heaters |
Python3 |
Easy |
Binary Search |
463 |
Island Perimeter |
Python3 |
Easy |
Hash Table |
461 |
Hamming Distance |
Python3, Java |
Easy |
Bit Manipulation |
459 |
Repeated Substring Pattern |
Python3 |
Easy |
String |
455 |
Assign Cookies |
Python3 |
Easy |
Greedy |
453 |
Minimum Moves to Equal Array Elements |
Python3 |
Easy |
Math |
448 |
Find All Numbers Disappeared in an Array |
Python3 |
Easy |
Array |
447 |
Number of Boomerangs |
Python3 |
Easy |
Hash Table |
443 |
String Compression |
Python3 |
Easy |
String |
441 |
Arranging Coins |
Python3 |
Easy |
Math, Binary Search |
437 |
Path Sum III |
Python3 |
Easy |
Tree |
434 |
Number of Segments in a String |
Python3 |
Easy |
String |
415 |
Add Strings |
Python3 |
Easy |
String |
414 |
Third Maximum Number |
Python3 |
Easy |
Array |
412 |
Fizz Buzz |
Python3, Java |
Easy |
None |
409 |
Longest Palindrome |
Python3 |
Easy |
Hash Table |
405 |
Convert a Number to Hexadecimal |
Python3 |
Easy |
Bit Manipulation |
403 |
Sum of Left Leaves |
Python3 |
Easy |
Tree |
401 |
Binary Watch |
Python3 |
Easy |
Bit Manipulation, Backtracking |
392 |
Is Subsequence |
Python3 |
Easy |
Greedy, Binary Search, Dynamic Programming |
389 |
Find the Difference |
Python3 |
Easy |
Bit Manipulation, Hash Table |
387 |
First Unique CHaracter in a String |
Python3, Java |
Easy |
Hash Table, String |
384 |
Shuffle an Array |
Java |
Medium |
Array, Math, Randomized |
383 |
Ransom Note |
Python3 |
Easy |
String |
380 |
Insert Delete GetRandom O(1) |
Java |
Medium |
Design, Array, Hash Table, Math, Randomized |
374 |
Guess Number Higher or Lower |
Python3 |
Easy |
Binary Search |
371 |
Sum of Two Integers |
Python3 |
Easy |
Bit Manipulation |
367 |
Valid Perfect Square |
Python3 |
Easy |
Math, Binary Search |
350 |
Intersection of Two Arrays II |
Python3, Java |
Easy |
Sort, Hash Table, Two Pointers, Binary Search |
349 |
Intersection of Two Arrays |
Python3 |
Easy |
Sort, Hash Table, Two Pointers, Binary Search |
347 |
Top K Frequent Elements |
Java |
Medium |
Array, Hash Table, Divide and Conquer, Bucket Sort, Counting, Quickselect, Sorting, Heap(Priority Queue) |
345 |
Reverse Vowels of a String |
Python3 |
Easy |
Two Pointers, String |
344 |
Reverse String |
Python3, Java |
Easy |
Two Pointers, String |
342 |
Power of Four |
Python3 |
Easy |
Bit Manipulation |
334 |
Increasing Triplet Subsequence |
Java |
Medium |
Greedy, Array |
328 |
Odd Even Linked List |
Java |
Medium |
Linked List |
326 |
Power of Three |
Python3, Java |
Easy |
Math |
322 |
Coin Change |
Java |
Medium |
Breadth-First, Array, Dynamic Programming |
303 |
Range Sum Query - Immutable |
Python3 |
Easy |
Dynamic Programming |
300 |
Longest Increasing Subsequence |
Java |
Medium |
Array, Binary Search, Dynamic Programming |
299 |
Bulls and Cows |
Python3 |
Easy |
Hash Table |
292 |
Nim Game |
Python3 |
Easy |
Brainteaser, Minimax |
297 |
Serialize and Deserialize Binary Tree |
Java |
Hard |
Tree, Depth-First Search, Breadth-First Search, Design, String, Binary Tree |
290 |
Word Pattern |
Python3 |
Easy |
Hash Table |
283 |
Move Zeroes |
Python3, Java |
Easy |
Array, Two Pointers |
278 |
First Bad Version |
Python3, Java |
Easy |
Binary Search |
268 |
Missing Number |
Python3, Java |
Easy |
Bit Manipulation, Array, Math |
263 |
Ugly Number |
Python3 |
Easy |
Math |
258 |
Add Digits |
Python3 |
Easy |
Math |
257 |
Binary Tree Paths |
Python3 |
Easy |
Tree, Depth-first Search |
242 |
Valid Anagram |
Python3, Java |
Easy |
Sort, Hash Table |
240 |
Search a 2D Matrix II |
Java |
Medium |
Array, Binary Search, Divide and Conquer, Matrix |
237 |
Delete Node in a Linked List |
Python3, Java |
Easy |
Linked List |
235 |
Lowest Common Ancestor of a Binary Search Tree |
Python3 |
Easy |
Tree |
234 |
Palindrome Linked List |
Python3, Java |
Easy |
Linked List, Two Pointers |
232 |
Implement Queue using Stacks |
Python3 |
Easy |
Stack, Design |
231 |
Power of Two |
Python3 |
Easy |
Bit Manipulation, Math |
230 |
Kth Smallest Element in a BST |
Java |
Medium |
Tree, Depth-First Search, Binary Search Tree, Binary Tree |
228 |
Summary Ranges |
Python3 |
Easy |
Array |
226 |
Invert Binary Tree |
Python3 |
Easy |
Tree |
225 |
Implement Stack using Queues |
Python3 |
Easy |
Stack, Design |
219 |
Contains Duplicate II |
Python3 |
Easy |
Array, Hash Table |
217 |
Contains Duplicate |
Python3, Java |
Easy |
Array, Hash Table |
215 |
Kth Largest Element in an Array |
Java |
Medium |
Array, Divide and Conquer, Quickselect, Sorting, Heap(Priority Queue) |
206 |
Reverse Linked List |
Python3, Java |
Easy |
Linked List |
205 |
Isomorphic Strings |
Python3 |
Easy |
Hash Table |
204 |
Count Primes |
Python3, Java |
Easy |
Hash Table, Math |
203 |
Remove Linked List Elements |
Python3 |
Easy |
Linked List |
202 |
Happy Number |
Python3, Java |
Easy |
Hash Table, Math |
200 |
Number of Islands |
Java |
Medium |
Depth-First Search, Breadth-First Search, Union Find, Array, Matrix |
198 |
House Robber |
Python3, Java |
Easy |
Dynamic Programming |
191 |
Number of 1 Bits |
Python3, Java |
Easy |
Bit Manipulation |
190 |
Reverse Bits |
Python3, Java |
Easy |
Bit Manipulation |
189 |
Rotate Array |
Python3, Java |
Easy |
Array |
187 |
Repeated DNA Sequences |
Python3 |
Medium |
Bit Manipulation, Hash Table, String, Sliding Windows, Hash Function, Rolling Hash |
179 |
Largest Number |
Python3 |
Medium |
Greedy, String, Sorting |
173 |
Binary Search Tree Iterator |
Python3 |
Medium |
Stack, Tree, Design, Binary Search Tree, Binary Tree, Iterator |
172 |
Factorial Trailing Zeroes |
Python3, Java |
Easy |
Math |
171 |
Excel Sheet Column Number |
Python3, Java |
Easy |
Math |
169 |
Majority Element |
Python3, Java |
Easy |
Bit Manipulation, Array, Divide and Conquer |
168 |
Excel Sheet Column Title |
Python3 |
Easy |
Math |
167 |
Two Sum II - Input Array is Sorted |
Python3 |
Easy |
Array, Two Pointers, Binary Search |
166 |
Fraction to Recurring Decimal |
Python3 |
Medium |
Hash Table, Math, String |
165 |
Compare Version Numbers |
Python3 |
Medium |
String |
162 |
Find Peak Element |
Python3, Java |
Medium |
Array, Binary Search |
160 |
Intersection of Two Linked Lists |
Python3, Java |
Easy |
Linked List |
155 |
Min Stack |
Python3, Java |
Easy |
Stack, Design |
153 |
Find Minimum in Rotated Sorted Array |
Python3 |
Medium |
Array, Binary Search |
152 |
Maximum Product Subarray |
Python3 |
Medium |
Array, Dynamic Programming |
151 |
Reverse Words in a String |
Python3 |
Medium |
String |
150 |
Evaluate Reverse Polish Notation |
Python3 |
Medium |
Stack |
148 |
Sort List |
Python3 |
Medium |
Sort, Linked List |
147 |
Insertion Sort List |
Python3 |
Medium |
Sort, Linked List |
146 |
LRU Cache |
Python3 |
Medium |
Design |
144 |
Binary Tree Preorder Traversal |
Python3 |
Medium |
Stack, Tree |
143 |
Reorder List |
Python3 |
Medium |
Linked List |
142 |
Linked List Cycle II |
Python3 |
Medium |
Linked List, Two Pointers |
141 |
Linked List Cycle |
Python3, Java |
Easy |
Linked List, Two Pointers |
139 |
Word Break |
Python3 |
Medium |
Dynamic Programming |
138 |
Copy List with Random Pointer |
Python3 |
Medium |
Hash Table, Linked List |
137 |
Single Number II |
Python3 |
Medium |
Bit Manipulation |
136 |
Single Number |
Python3, Java |
Easy |
Bit Manipulation, Hash Table |
134 |
Gas Station |
Python3 |
Medium |
Greedy |
133 |
Clone Graph |
Python3 |
Medium |
Depth-first Search, Breadth-first Search, Graph |
131 |
Palindrome Partitioning |
Python3 |
Medium |
Depth-first Search, Dynamic Programming, Backtracking |
130 |
Surrounded Regions |
Python3 |
Medium |
Depth-first Search, Breadth-first Search, Union Find |
129 |
Sum Root to Leaf Numbers |
Python3 |
Medium |
Tree, Depth-first Search |
128 |
Longest Consecutive Sequence |
Python3 |
Medium |
Union Find, Array |
125 |
Valid Palindrome |
Python3, Java |
Easy |
Two Pointers, String |
122 |
Best Time to Buy and Sell Stock II |
Python3, Java |
Easy |
Greedy, Array |
121 |
Best Time to Buy and Sell Stock |
Python3, Java |
Easy |
Array, Dynamic Programming |
120 |
Triangle |
Python3 |
Medium |
Array, Dynamic Programming |
119 |
Pascal's Triangle II |
Python3 |
Easy |
Array |
118 |
Pascal's Triangle |
Python3, Java |
Easy |
Array |
117 |
Populating Next Right Pointers in Each Node |
Python3 |
Medium |
Tree, Depth-first Search |
116 |
Populating Next Right Pointers in Each Node |
Python3, Java |
Medium |
Tree, Depth-first Search, Breadth-first Search |
114 |
Flatten Binary Tree to Linked List |
Python3 |
Medium |
Tree, Depth-first Search |
113 |
Path Sum II |
Python3 |
Medium |
Tree, Depth-first Search |
112 |
Path Sum |
Python3 |
Easy |
Tree, Depth-first Search |
111 |
Minimum Depth of Binary Tree |
Python3 |
Easy |
Tree, Depth-first Search, Breadth-first Search |
110 |
Balanced Binary Tree |
Python3 |
Easy |
Tree, Depth-first Search |
109 |
Convert Sorted List to Binary Search Tree |
Python3 |
Medium |
Depth-first Search, Linked List |
108 |
Convert Sorted Array to Binary Search Tree |
Python3, Java |
Easy |
Tree, Depth-first Search |
107 |
Binary Tree Level Order Traversal II |
Python3 |
Easy |
Tree, Breadth-first Search |
106 |
Construct Binary Tree from Inorder and Postorder Traversal |
Python3 |
Medium |
Tree, Depth-first Search, Array |
105 |
Construct Binary Tree from Preorder and Inorder Traversal |
Python3, Java |
Medium |
Tree, Depth-first Search, Array |
104 |
Maximum Depth of Binary Tree |
Python3, Java |
Easy |
Tree, Depth-first Search |
103 |
Binary Tree Zigzag Level Order Traversal |
Java |
Medium |
Tree, Breadth-First Search, Binary Tree |
102 |
Binary Tree Level Order Traversal |
Python3, Java |
Medium |
Tree, Breadth-first Search |
101 |
Symmetric Tree |
Python3, Java |
Easy |
Tree, Depth-first Search, Breadth-first Search |
100 |
Same Tree |
Python3 |
Easy |
Tree, Depth-first Search |
98 |
Validate Binary Search Tree |
Python3, Java |
Medium |
Tree, Depth-first Search, Recursion |
97 |
Interleaving String |
Python3 |
Medium |
String, Dynamic Programming |
96 |
Unique Binary Search Trees |
Python3 |
Medium |
Tree, Dynamic Programming |
95 |
Unique Binary Search Trees II |
Python3 |
Medium |
Tree, Dynamic Programming |
94 |
Binary Tree Inorder Traversal |
Python3, Java |
Medium |
Stack, Tree, Hash Table |
93 |
Restore IP Addresses |
Python3 |
Medium |
String, Backtracking |
92 |
Reverse Linked List II |
Python3 |
Medium |
Linked List |
91 |
Decode Ways |
Python3 |
Medium |
String, Dynamic Programming |
90 |
Subsets II |
Python3 |
Medium |
Array, Backtracking |
89 |
Gray Code |
Python3 |
Medium |
Backtracking |
88 |
Merge Sorted Array |
Python3, Java |
Easy |
Array, Two Pointers |
86 |
Partition List |
Python3 |
Medium |
Linked List, Two Pointers |
83 |
Remove Duplicates from Sorted List |
Python3 |
Easy |
Linked List |
82 |
Remove Duplicates from Sorted List II |
Python3 |
Medium |
Linked List |
81 |
Search in Rotated Sorted Array II |
Python3 |
Medium |
Array, Binary Search |
80 |
Remove Duplicates from Sorted Array II |
Python3 |
Medium |
Array, Two Pointers |
79 |
Word Search |
Python3, Java |
Medium |
Array, Backtracking |
78 |
Subsets |
Python3, Java |
Medium |
Bit Manipulation, Array, Backtracking |
77 |
Combinations |
Python3 |
Medium |
Backtracking |
75 |
Sort Colors |
Python3, Java |
Medium |
Sort, Array, Two Pointers |
74 |
Search a 2D Matrix |
Python3 |
Medium |
Array, Binary Search |
73 |
Set Matrix Zeroes |
Python3, Java |
Medium |
Array |
71 |
Simplify Path |
Python3 |
Medium |
Stack, String |
70 |
Climbing Stairs |
Python3, Java |
Easy |
Dynamic Programming |
69 |
Sqrt(x) |
Python3, Java |
Easy |
Math, Binary Search |
67 |
Add Binary |
Python3 |
Easy |
Math, String |
66 |
Plus One |
Python3, Java |
Easy |
Array |
64 |
Minimum Path Sum |
Python3 |
Medium |
Array, Dynamic Programming |
63 |
Unique Paths II |
Python3 |
Medium |
Array, Dynamic Programming |
62 |
Unique Paths |
Python3, Java |
Medium |
Array, Dynamic Programming |
61 |
Rotate List |
Python3 |
Medium |
Linked List, Two Pointers |
59 |
Spiral Matrix II |
Python3 |
Medium |
Array |
58 |
Length of Last Word |
Python3 |
Easy |
String |
57 |
Insert Interval |
Python3 |
Medium |
Sort, Array |
56 |
Merge Intervals |
Python3, Java |
Medium |
Sort, Array |
55 |
Jump Game |
Python3, Java |
Medium |
Greedy, Array |
54 |
Spiral Matrix |
Python3 |
Medium |
Array |
53 |
Maximum Subarray |
Python3, Java |
Easy |
Array, Divide and Conquer, Dynamic Programming |
50 |
Pow(x, n) |
Python3, Java |
Medium |
Math, Binary Search |
49 |
Group Anagrams |
Python3, Java |
Medium |
Hash Table, String |
48 |
Rotate Image |
Python3, Java |
Medium |
Array |
47 |
Permutations II |
Python3 |
Medium |
Backtracking |
46 |
Permutations |
Python3, Java |
Medium |
Backtracking |
45 |
Jump Game II |
Python3 |
Medium |
Greedy, Array |
43 |
Multiply Strings |
Python3 |
Medium |
Math, String |
40 |
Combination Sum II |
Python3 |
Medium |
Array, Backtracking |
39 |
Combination Sum |
Python3 |
Medium |
Array, Backtracking |
38 |
Count And Say |
Python3, Java |
Easy |
String |
36 |
Valid Sudoku |
Python3, Java |
Medium |
Hash Table |
35 |
Search Insert Position |
Python3 |
Easy |
Array, Binary Search |
34 |
Find First and Last Position of Element in Sorted Array |
Python3, Java |
Medium |
Array, Binary Search |
33 |
Search in Rotated Sorted Array |
Python3, Java |
Medium |
Array, Binary Search |
31 |
Next Permutation |
Python3 |
Medium |
Array |
29 |
Divide Two Integers |
Python3, Java |
Medium |
Math, Binary Search |
28 |
Implement strStr() |
Python3, Java |
Easy |
Two Pointers, String |
27 |
Remove Element |
Python3 |
Easy |
Array, Two Pointers |
26 |
Remove Duplicates From Sorted Array |
Python3, Java |
Easy |
Array, Two Pointers |
24 |
Swap Nodes in Pairs |
Python3 |
Medium |
Recursion, Linked List |
22 |
Generate Parentheses |
Python3, Java |
Medium |
String, Backtracking |
21 |
Merge Two Sorted Lists |
Python3, Java |
Easy |
Linked List |
20 |
Valid Parentheses |
Python3, Java |
Easy |
Stack, String |
19 |
Remove Nth Node From End of List |
Python3, Java |
Medium |
Linked List, Two Pointers |
18 |
4Sum |
Python3 |
Medium |
Array, Hash Table, Two Pointers |
17 |
Letter Combinations of a Phone Number |
Python3, Java |
Medium |
Depth-first Search, Recursion, String, Backtracking |
16 |
3Sum Closest |
Python3 |
Medium |
Array, Two Pointers |
15 |
3Sum |
Python3, Java |
Medium |
Array, Two Pointers |
14 |
Longest Common Prefix |
Python3, Java |
Easy |
String |
13 |
Roman to Integer |
Python3, Java |
Easy |
Math, String |
12 |
Integer to Roman |
Python3 |
Medium |
Math, String |
11 |
Container With Most Water |
Python3 |
Medium |
Array, Two Pointers |
9 |
Palindrome Number |
Python3 |
Easy |
Math |
8 |
String to Integer (atoi) |
Python3, Java |
Medium |
Math, String |
7 |
Reverse Integer |
Python3, Java |
Easy |
Math |
6 |
Zigzag Conversion |
Python3 |
Medium |
String |
5 |
Longest Palindromic Substring |
Python3, Java |
Medium |
String, Dynamic Programming |
3 |
Longest Substring Without Repeating Characters |
Python3, Java |
Medium |
Hash Table, Two Pointers, String, Sliding Window |
2 |
Add Two Numbers |
Python3, Java |
Medium |
Recursion, Linked List, Math |
1 |
Two Sum |
Python3, Java |
Easy |
Array, Hash Table |