0001 |
Two Sum |
C++ Java |
44.23% |
Easy |
Array | Hash Table |
0002 |
Add Two Numbers |
C++ Java |
31.21% |
Medium |
Linked List | Math |
0003 |
Longest Substring Without Repeating Characters |
C++ Java |
28.44% |
Medium |
Hash Table | Two Pointers | String | Sliding Window |
0004 |
Median of Two Sorted Arrays |
C++ Java |
26.49% |
Hard |
Array | Binary Search | Divide and Conquer |
0005 |
Longest Palindromic Substring |
C++ Java |
27.39% |
Medium |
String | Dynamic Programming |
0006 |
ZigZag Conversion |
C++ Java |
32.05% |
Medium |
String |
0007 |
Reverse Integer |
C++ Java |
25.34% |
Easy |
Math |
0008 |
String to Integer (atoi) |
C++ |
14.67% |
Medium |
Math | String |
0009 |
Palindrome Number |
C++ |
43.55% |
Easy |
Math |
0011 |
Container With Most Water |
Java |
44.87% |
Medium |
Array | Two Pointers |
0012 |
Integer to Roman |
C++ Java |
51.13% |
Medium |
Math | String |
0013 |
Roman to Integer |
C++ Java |
52.51% |
Easy |
Math | String |
0014 |
Longest Common Prefix |
Java |
33.61% |
Easy |
String |
0015 |
3Sum |
Java |
24.11% |
Medium |
Array | Two Pointers |
0016 |
3Sum Closest |
Java |
45.77% |
Medium |
Array | Two Pointers |
0017 |
Letter Combinations of a Phone Number |
C++ Java |
41.77% |
Medium |
String | Backtracking |
0018 |
4Sum |
Java |
30.67% |
Medium |
Array | Hash Table | Two Pointers |
0019 |
Remove Nth Node From End of List |
Java |
34.30% |
Medium |
Linked List | Two Pointers |
0020 |
Valid Parentheses |
Java |
36.62% |
Easy |
String | Stack |
0021 |
Merge Two Sorted Lists |
Java |
47.51% |
Easy |
Linked List |
0022 |
Generate Parentheses |
C++ |
55.22% |
Medium |
String | Backtracking |
0023 |
Merge k Sorted Lists |
C++ Java |
34.71% |
Hard |
Linked List | Divide and Conquer | Heap |
0024 |
Swap Nodes in Pairs |
C++ Java |
44.92% |
Medium |
Linked List |
0025 |
Reverse Nodes in k-Group |
C++ |
36.64% |
Hard |
Linked List |
0026 |
Remove Duplicates from Sorted Array |
C++ Java |
40.87% |
Easy |
Array | Two Pointers |
0027 |
Remove Element |
C++ Java |
44.69% |
Easy |
Array | Two Pointers |
0028 |
Implement strStr() |
C++ Java |
32.13% |
Easy |
Two Pointers | String |
0029 |
Divide Two Integers |
C++ Java |
16.15% |
Medium |
Math | Binary Search |
0031 |
Next Permutation |
C++ |
30.55% |
Medium |
Array |
0035 |
Search Insert Position |
Java |
40.90% |
Easy |
Array | Binary Search |
0039 |
Combination Sum |
C++ Java |
48.82% |
Medium |
Array | Backtracking |
0040 |
Combination Sum II |
C++ Java |
41.85% |
Medium |
Array | Backtracking |
0041 |
First Missing Positive |
Java |
28.98% |
Hard |
Array |
0045 |
Jump Game II |
C++ |
28.15% |
Hard |
Array | Greedy |
0046 |
Permutations |
C++ Java |
55.49% |
Medium |
Backtracking |
0047 |
Permutations II |
C++ |
40.71% |
Medium |
Backtracking |
0048 |
Rotate Image |
C++ Java |
48.79% |
Medium |
Array |
0049 |
Group Anagrams |
C++ Java |
47.09% |
Medium |
Hash Table | String |
0050 |
Pow(x, n) |
C++ Java |
28.03% |
Medium |
Math | Binary Search |
0053 |
Maximum Subarray |
C++ Java |
43.72% |
Easy |
Array | Divide and Conquer | Dynamic Programming |
0054 |
Spiral Matrix |
C++ Java |
30.58% |
Medium |
Array |
0055 |
Jump Game |
C++ Java |
32.00% |
Medium |
Array | Greedy |
0059 |
Spiral Matrix II |
C++ Java |
46.82% |
Medium |
Array |
0062 |
Unique Paths |
C++ Java |
47.79% |
Medium |
Array | Dynamic Programming |
0063 |
Unique Paths II |
C++ Java |
33.50% |
Medium |
Array | Dynamic Programming |
0064 |
Minimum Path Sum |
C++ Java |
47.10% |
Medium |
Array | Dynamic Programming |
0066 |
Plus One |
Java |
41.32% |
Easy |
Array |
0069 |
Sqrt(x) |
C++ Java |
31.43% |
Easy |
Math | Binary Search |
0070 |
Climbing Stairs |
C++ Java |
44.29% |
Easy |
Dynamic Programming |
0072 |
Edit Distance |
C++ Java |
37.95% |
Hard |
String | Dynamic Programming |
0073 |
Set Matrix Zeroes |
C++ Java |
39.96% |
Medium |
Array |
0075 |
Sort Colors |
C++ Java |
42.32% |
Medium |
Array | Two Pointers | Sort |
0078 |
Subsets |
C++ Java |
53.12% |
Medium |
Array | Backtracking | Bit Manipulation |
0089 |
Gray Code |
C++ Java |
45.89% |
Medium |
Backtracking |
0090 |
Subsets II |
C++ Java |
42.58% |
Medium |
Array | Backtracking |
0093 |
Restore IP Addresses |
C++ |
31.61% |
Medium |
String | Backtracking |
0098 |
Validate Binary Search Tree |
C++ Java |
25.80% |
Medium |
Tree | Depth-first Search |
0100 |
Same Tree |
Java |
50.12% |
Easy |
Tree | Depth-first Search |
0101 |
Symmetric Tree |
C++ |
43.57% |
Easy |
Tree | Depth-first Search | Breadth-first Search |
0104 |
Maximum Depth of Binary Tree |
C++ |
60.74% |
Easy |
Tree | Depth-first Search |
0111 |
Minimum Depth of Binary Tree |
C++ |
35.37% |
Easy |
Tree | Depth-first Search | Breadth-first Search |
0113 |
Path Sum II |
C++ |
40.85% |
Medium |
Tree | Depth-first Search |
0121 |
Best Time to Buy and Sell Stock |
C++ Java |
47.38% |
Easy |
Array | Dynamic Programming |
0122 |
Best Time to Buy and Sell Stock II |
C++ Java |
52.08% |
Easy |
Array | Greedy |
0128 |
Longest Consecutive Sequence |
C++ |
41.81% |
Hard |
Array | Union Find |
0130 |
Surrounded Regions |
C++ |
22.99% |
Medium |
Depth-first Search | Breadth-first Search | Union Find |
0134 |
Gas Station |
C++ Java |
33.98% |
Medium |
Greedy |
0136 |
Single Number |
C++ Java |
60.34% |
Easy |
Hash Table | Bit Manipulation |
0137 |
Single Number II |
C++ |
46.08% |
Medium |
Bit Manipulation |
0141 |
Linked List Cycle |
Java |
37.08% |
Easy |
Linked List | Two Pointers |
0142 |
Linked List Cycle II |
Java |
32.26% |
Medium |
Linked List | Two Pointers |
0146 |
LRU Cache |
C++ Java |
25.72% |
Medium |
Design |
0148 |
Sort List |
Java |
35.59% |
Medium |
Linked List | Sort |
0167 |
Two Sum II - Input array is sorted |
C++ |
50.50% |
Easy |
Array | Two Pointers | Binary Search |
0169 |
Majority Element |
C++ Java |
52.84% |
Easy |
Array | Divide and Conquer | Bit Manipulation |
0187 |
Repeated DNA Sequences |
C++ Java |
36.15% |
Medium |
Hash Table | Bit Manipulation |
0190 |
Reverse Bits |
C++ Java |
31.52% |
Easy |
Bit Manipulation |
0191 |
Number of 1 Bits |
C++ Java |
43.40% |
Easy |
Bit Manipulation |
0198 |
House Robber |
C++ Java |
41.06% |
Easy |
Dynamic Programming |
0201 |
Bitwise AND of Numbers Range |
C++ |
35.98% |
Medium |
Bit Manipulation |
0209 |
Minimum Size Subarray Sum |
C++ |
34.97% |
Medium |
Array | Two Pointers | Binary Search |
0215 |
Kth Largest Element in an Array |
C++ Java |
48.06% |
Medium |
Divide and Conquer | Heap |
0216 |
Combination Sum III |
C++ Java |
51.71% |
Medium |
Array | Backtracking |
0217 |
Contains Duplicate |
C++ Java |
52.11% |
Easy |
Array | Hash Table |
0230 |
Kth Smallest Element in a BST |
Java |
51.69% |
Medium |
Binary Search | Tree |
0231 |
Power of Two |
Java |
42.01% |
Easy |
Math | Bit Manipulation |
0237 |
Delete Node in a Linked List |
C++ Java |
53.80% |
Easy |
Linked List |
0238 |
Product of Array Except Self |
C++ Java |
55.24% |
Medium |
Array |
0240 |
Search a 2D Matrix II |
C++ Java |
40.93% |
Medium |
Binary Search | Divide and Conquer |
0260 |
Single Number III |
C++ |
57.16% |
Medium |
Bit Manipulation |
0263 |
Ugly Number |
C++ Java |
40.64% |
Easy |
Math |
0268 |
Missing Number |
Java |
48.53% |
Easy |
Array | Math | Bit Manipulation |
0279 |
Perfect Squares |
C++ Java |
42.11% |
Medium |
Math | Dynamic Programming | Breadth-first Search |
0283 |
Move Zeroes |
Java |
54.43% |
Easy |
Array | Two Pointers |
0287 |
Find the Duplicate Number |
C++ |
49.80% |
Medium |
Array | Two Pointers | Binary Search |
0303 |
Range Sum Query - Immutable |
C++ Java |
38.17% |
Easy |
Dynamic Programming |
0318 |
Maximum Product of Word Lengths |
C++ Java |
48.56% |
Medium |
Bit Manipulation |
0338 |
Counting Bits |
C++ Java |
64.80% |
Medium |
Dynamic Programming | Bit Manipulation |
0342 |
Power of Four |
C++ Java |
40.31% |
Easy |
Bit Manipulation |
0343 |
Integer Break |
C++ |
47.87% |
Medium |
Math | Dynamic Programming |
0344 |
Reverse String |
C++ Java |
63.37% |
Easy |
Two Pointers | String |
0349 |
Intersection of Two Arrays |
C++ |
54.89% |
Easy |
Hash Table | Two Pointers | Binary Search | Sort |
0357 |
Count Numbers with Unique Digits |
C++ Java |
46.96% |
Medium |
Math | Dynamic Programming | Backtracking |
0371 |
Sum of Two Integers |
C++ |
50.90% |
Easy |
Bit Manipulation |
0387 |
First Unique Character in a String |
C++ Java |
50.15% |
Easy |
Hash Table | String |
0389 |
Find the Difference |
C++ |
53.15% |
Easy |
Hash Table | Bit Manipulation |
0392 |
Is Subsequence |
C++ Java |
46.84% |
Medium |
Binary Search | Dynamic Programming | Greedy |
0397 |
Integer Replacement |
C++ Java |
31.47% |
Medium |
Math | Bit Manipulation |
0401 |
Binary Watch |
C++ |
45.37% |
Easy |
Backtracking | Bit Manipulation |
0412 |
Fizz Buzz |
C++ Java |
59.59% |
Easy |
|
0421 |
Maximum XOR of Two Numbers in an Array |
C++ |
51.15% |
Medium |
Bit Manipulation | Trie |
0435 |
Non-overlapping Intervals |
C++ Java |
41.60% |
Medium |
Greedy |
0452 |
Minimum Number of Arrows to Burst Balloons |
C++ Java |
46.52% |
Medium |
Greedy |
0454 |
4Sum II |
C++ Java |
50.74% |
Medium |
Hash Table | Binary Search |
0455 |
Assign Cookies |
C++ Java |
48.50% |
Easy |
Greedy |
0461 |
Hamming Distance |
C++ |
70.37% |
Easy |
Bit Manipulation |
0473 |
Matchsticks to Square |
C++ |
35.94% |
Medium |
Depth-first Search |
0476 |
Number Complement |
C++ |
62.41% |
Easy |
Bit Manipulation |
0477 |
Total Hamming Distance |
C++ |
48.97% |
Medium |
Bit Manipulation |
0542 |
01 Matrix |
C++ |
35.80% |
Medium |
Depth-first Search | Breadth-first Search |
0643 |
Maximum Average Subarray I |
C++ |
39.61% |
Easy |
Array |
0679 |
24 Game |
Java |
42.94% |
Hard |
Depth-first Search |
0690 |
Employee Importance |
C++ |
54.20% |
Easy |
Hash Table | Depth-first Search | Breadth-first Search |
0733 |
Flood Fill |
C++ |
50.98% |
Easy |
Depth-first Search |
0746 |
Min Cost Climbing Stairs |
C++ Java |
47.32% |
Easy |
Array | Dynamic Programming |
0828 |
Unique Letter String |
Java |
39.66% |
Hard |
Two Pointers |
0832 |
Flipping an Image |
Java |
72.71% |
Easy |
Array |
0833 |
Find And Replace in String |
Java |
46.35% |
Medium |
String |
0834 |
Sum of Distances in Tree |
Java |
39.59% |
Hard |
Tree | Depth-first Search |
0836 |
Rectangle Overlap |
Java |
46.57% |
Easy |
Math |
0840 |
Magic Squares In Grid |
C++ Java |
35.57% |
Easy |
Array |
0841 |
Keys and Rooms |
C++ Java |
60.39% |
Medium |
Depth-first Search | Graph |
0848 |
Shifting Letters |
C++ Java |
40.84% |
Medium |
String |
0849 |
Maximize Distance to Closest Person |
C++ Java |
40.92% |
Easy |
Array |
0851 |
Loud and Rich |
C++ Java |
47.69% |
Medium |
Depth-first Search |
0852 |
Peak Index in a Mountain Array |
Java |
69.65% |
Easy |
Binary Search |
0853 |
Car Fleet |
C++ |
39.80% |
Medium |
Sort |
0860 |
Lemonade Change |
C++ Java |
50.54% |
Easy |
Greedy |
0861 |
Score After Flipping Matrix |
C++ Java |
69.63% |
Medium |
Greedy |
0898 |
Bitwise ORs of Subarrays |
C++ |
34.18% |
Medium |
Dynamic Programming | Bit Manipulation |
0905 |
Sort Array By Parity |
C++ |
72.58% |
Easy |
Array |
0945 |
Minimum Increment to Make Array Unique |
C++ Java |
42.90% |
Medium |
Array |
0946 |
Validate Stack Sequences |
C++ Java |
57.57% |
Medium |
Stack |
0948 |
Bag of Tokens |
C++ Java |
39.35% |
Medium |
Greedy |
0953 |
Verifying an Alien Dictionary |
C++ |
55.59% |
Easy |
Hash Table |
0954 |
Array of Doubled Pairs |
C++ |
34.36% |
Medium |
Array | Hash Table |
0955 |
Delete Columns to Make Sorted II |
C++ |
31.43% |
Medium |
Greedy |
1002 |
Find Common Characters |
C++ Java |
65.90% |
Easy |
Array | Hash Table |