/LeetCode

Work Harder and Learn More

Primary LanguageC++

LeetCode

Work Harder and Learn More

number question level c++
Easy c++
Medium c++
Hard c++
1 Two Sum Easy c++
2 Add Two Numbers Medium c++
3 Longest Substring Without Repeating Characters Medium c++
5 Longest Palindromic Substring Medium c++
8 String to Integer (atoi) Medium c++
9 Palindrome Number Easy c++
11 Container With Most Water Easy c++
14 Longest Common Prefix Easy c++
15 3Sum Medium c++
16 3Sum Closest Medium c++
19 Remove Nth Node From End of List Medium c++
20 Valid Parentheses Easy c++
21 Merge Two Sorted Lists Easy c++
22 Generate Parentheses Medium c++
24 Swap Nodes in Pairs Medium c++
26 Remove Duplicates from Sorted Array Easy c++
27 Remove Element Easy c++
28 Implement strStr() Easy c++
32 Longest Valid Parentheses Hard c++
33 Search in Rotated Sorted Array Medium c++
34 Find First and Last Position of Element in Sorted Array Medium c++
35 Search Insert Position Easy c++
36 Valid Sudoku Medium c++
41 First Missing Positive Hard c++
42 Trapping Rain Water Hard c++
44 Wildcard Matching Hard c++
46 Permutations Medium c++
48 Rotate Image Medium c++
49 Group Anagrams Medium c++
50 Pow(x, n) Medium c++
53 Maximum Subarray Easy c++
54 Spiral Matrix Medium c++
55 Jump Game Medium c++
56 Merge Intervals Medium c++
58 Length of Last Word Easy c++
61 Rotate List Medium c++
62 Unique Paths Medium c++
63 Unique Paths II Medium c++
66 Plus One Easy c++
67 Add Binary Easy c++
69 Sqrt(x) Easy c++
70 Climbing Stairs Easy c++
72 Edit Distance Hard c++
79 Word Search Medium c++
82 Remove Duplicates from Sorted List II Medium c++
84 Largest Rectangle in Histogram Hard c++
94 Binary Tree Inorder Traversal Medium c++
95 Unique Binary Search Trees II Medium c++
96 Unique Binary Search Trees Medium c++
98 Validate Binary Search Tree Medium c++
101 Symmetric Tree Easy c++
104 Maximum Depth of Binary Tree Easy c++
105 Construct Binary Tree from Preorder and Inorder Traversal Medium c++
106 Construct Binary Tree from Inorder and Postorder Traversal Medium c++
108 Convert Sorted Array to Binary Search Tree Easy c++
110 Balanced Binary Tree Easy c++
112 Path Sum Easy c++
116 Populating Next Right Pointers in Each Node Medium c++
118 Pascal's Triangle Easy c++
119 Pascal's Triangle II Easy c++
121 Best Time to Buy and Sell Stock Easy c++
133 Clone Graph Medium c++
136 Single Number Easy c++
138 Copy List with Random Pointer Medium c++
139 Word Break Medium c++
140 Word Break II Medium c++
141 Linked List Cycle Easy c++
142 Linked List Cycle II Medium c++
144 Binary Tree Preorder Traversal Medium c++
145 Binary Tree Postorder Traversal Hard c++
150 Evaluate Reverse Polish Notation Medium c++
151 Reverse Words in a String Medium c++
152 Maximum Product Subarray Medium c++
153 Find Minimum in Rotated Sorted Array Medium c++
154 Find Minimum in Rotated Sorted Array II Hard c++
155 Min Stack Easy c++
160 Intersection of Two Linked Lists Easy c++
162 Find Peak Element Medium c++
167 Two Sum II - Input array is sorted Easy c++
169 Majority Element Easy c++
173 Binary Search Tree Iterator Medium c++
189 Rotate Array Easy c++
198 House Robber Easy c++
199 Binary Tree Right Side View Medium c++
200 Number of Islands Medium c++
202 Happy Number Easy c++
203 Remove Linked List Elements Easy c++
205 Isomorphic Strings Easy c++
206 Reverse Linked List Easy c++
208 Implement Trie (Prefix Tree) Medium c++
209 Minimum Size Subarray Sum Medium c++
211 Add and Search Word - Data structure design Medium c++
212 Word Search II Hard c++
213 House Robber II Medium c++
217 Contains Duplicate Easy c++
219 Contains Duplicate II Easy c++
220 Contains Duplicate III Medium c++
221 Maximal Square Medium c++
225 Implement Stack using Queues Easy c++
232 Implement Queue using Stacks Easy c++
234 Palindrome Linked List Easy c++
238 Product of Array Except Self Medium c++
264 Ugly Number II Medium c++
278 First Bad Version Easy c++
279 Perfect Squares Medium c++
283 Move Zeroes Easy c++
287 Find the Duplicate Number Medium c++
297 Serialize and Deserialize Binary Tree Hard c++
300 Longest Increasing Subsequence Medium c++
303 Range Sum Query - Immutable Easy c++
328 Odd Even Linked List Medium c++
336 Palindrome Pairs Hard c++
338 Counting Bits Medium c++
343 Integer Break Medium c++
344 Reverse String Easy c++
345 Reverse Vowels of a String Easy c++
347 Top K Frequent Elements Medium c++
349 Intersection of Two Arrays Easy c++
350 Intersection of Two Arrays II Easy c++
355 Design Twitter Medium c++
357 Count Numbers with Unique Digits Medium c++
365 Water and Jug Problem Medium c++
367 Valid Perfect Square Easy c++
368 Largest Divisible Subset Medium c++
374 Guess Number Higher or Lower Easy c++
375 Guess Number Higher or Lower II Medium c++
376 Wiggle Subsequence Medium c++
377 Combination Sum IV Medium c++
378 Kth Smallest Element in a Sorted Matrix Medium c++
380 Insert Delete GetRandom O(1) Medium c++
383 Ransom Note Easy c++
387 First Unique Character in a String Easy c++
392 Is Subsequence Easy c++
394 Decode String Medium c++
409 Longest Palindrome Easy c++
413 Arithmetic Slices Medium c++
415 Add Strings Easy c++
416 Partition Equal Subset Sum Medium c++
421 Maximum XOR of Two Numbers in an Array Medium c++
429 N-ary Tree Level Order Traversal Medium c++
430 Flatten a Multilevel Doubly Linked List Medium c++
434 Number of Segments in a String Easy c++
443 String Compression Easy c++
445 Add Two Numbers II Medium c++
448 Find All Numbers Disappeared in an Array Easy c++
450 Delete Node in a BST Medium c++
454 4Sum II Medium c++
455 Assign Cookies Easy c++
459 Repeated Substring Pattern Easy c++
460 LFU Cache Hard c++
467 Unique Substrings in Wraparound String Medium c++
474 Ones and Zeroes Medium c++
485 Max Consecutive Ones Easy c++
494 Target Sum Medium c++
498 Diagonal Traverse Medium c++
516 Longest Palindromic Subsequence Medium c++
518 Coin Change 2 Medium c++
520 Detect Capital Easy c++
521 Longest Uncommon Subsequence I Easy c++
541 Reverse String II Easy c++
542 01 Matrix Medium c++
543 Diameter of Binary Tree Easy c++
551 Student Attendance Record I Easy c++
557 Reverse Words in a String III Easy c++
559 Maximum Depth of N-ary Tree Easy c++
561 Array Partition I Easy c++
566 Reshape the Matrix Easy c++
572 Subtree of Another Tree Easy c++
583 Delete Operation for Two Strings Medium c++
576 Out of Boundary Paths Medium c++
589 N-ary Tree Preorder Traversal Easy c++
590 N-ary Tree Postorder Traversal Easy c++
599 Minimum Index Sum of Two Lists Easy c++
605 Can Place Flowers Easy c++
606 Construct String from Binary Tree Easy c++
622 Design Circular Queue Medium c++
638 Shopping Offers Medium c++
648 Replace Words Medium c++
650 2 Keys Keyboard Medium c++
652 Find Duplicate Subtrees Medium c++
658 Find K Closest Elements Medium c++
673 Number of Longest Increasing Subsequence Medium c++
677 Map Sum Pairs Medium c++
688 Knight Probability in Chessboard Medium c++
695 Max Area of Island Medium c++
698 Partition to K Equal Sum Subsets Medium c++
700 Search in a Binary Search Tree Easy c++
701 Insert into a Binary Search Tree Medium c++
704 Binary Search Easy c++
705 Design HashSet Easy c++
706 Design HashMap Easy c++
707 Design Linked List Medium c++
709 To Lower Case Easy c++
712 Minimum ASCII Delete Sum for Two Strings Medium c++
718 Maximum Length of Repeated Subarray Medium c++
724 Find Pivot Index Easy c++
733 Flood Fill Easy c++
739 Daily Temperatures Medium c++
740 Delete and Earn Medium c++
744 Find Smallest Letter Greater Than Target Easy c++
746 Min Cost Climbing Stairs Easy c++
747 Largest Number At Least Twice of Others Easy c++
752 Open the Lock Medium c++
771 Jewels and Stones Easy c++
779 K-th Symbol in Grammar Medium c++
820 Short Encoding of Words Medium c++
836 Rectangle Overlap Easy c++
841 Keys and Rooms Medium c++
860 Lemonade Change Easy c++
876 Middle of the Linked List Easy c++
877 Stone Game Medium c++
892 Surface Area of 3D Shapes Easy c++
944 Delete Columns to Make Sorted Easy c++
945 Minimum Increment to Make Array Unique Medium c++
983 Minimum Cost For Tickets Medium c++
994 Rotting Oranges Easy c++
1005 Maximize Sum Of Array After K Negations Easy c++
1013 Partition Array Into Three Parts With Equal Sum Easy c++
1025 Divisor Game Easy c++
1029 Two City Scheduling Easy c++
1035 Uncrossed Lines Medium c++
1049 Last Stone Weight Easy c++
1071 Greatest Common Divisor of Strings Easy c++
1095 Find in Mountain Array Hard c++
1103 Distribute Candies to People Easy c++
1160 Find Words That Can Be Formed by Characters Easy c++
1162 As Far from Land as Possible Medium c++
1217 Play with Chips Easy c++
1221 Split a String in Balanced Strings Easy c++
1248 Count Number of Nice Subarrays Medium c++
1277 Count Square Submatrices with All Ones Medium c++
1300 Sum of Mutated Array Closest to Target Medium c++