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