Skip to content

husy8/LeetCode

Repository files navigation

LeetCode

LeetCode solutions in C++ 11.

NO. Title Solution Note Difficulty
0 Two Sum C++ Note Easy
1 Add Two Numbers C++ Note Medium
2 Longest Substring Without Repeating Characters C++ Note Medium
3 Median of Two Sorted Arrays C++ Note Hard
4 Longest Palindromic Substring C++ Note Medium
5 ZigZag Conversion C++ Note Medium
6 Reverse Integer C++ Note Easy
7 String to Integer (atoi) C++ Note Medium
8 Palindrome Number C++ Note Easy
9 Regular Expression Matching C++ Note Hard
10 Container With Most Water C++ Note Medium
11 Integer to Roman C++ Note Medium
12 Roman to Integer C++ Note Easy
13 Longest Common Prefix C++ Note Easy
14 3Sum C++ Note Medium
15 3Sum Closest C++ Note Medium
16 Letter Combinations of a Phone Number C++ Note Medium
17 4Sum C++ Note Medium
18 Remove Nth Node From End of List C++ Note Medium
19 Valid Parentheses C++ Note Easy
20 Merge Two Sorted Lists C++ Note Easy
21 Generate Parentheses C++ Note Medium
22 Merge k Sorted Lists C++ Note Hard
23 Swap Nodes in Pairs C++ Note Medium
24 Reverse Nodes in k-Group C++ Note Hard
25 Remove Duplicates from Sorted Array C++ Note Easy
26 Remove Element C++ Note Easy
27 Implement strStr() C++ Note Easy
28 Divide Two Integers C++ Note Medium
29 Substring with Concatenation of All Words C++ Note Hard
30 Next Permutation C++ Note Medium
31 Longest Valid Parentheses C++ Note Hard
32 Search in Rotated Sorted Array C++ Note Medium
33 Search for a Range C++ Note Medium
34 Search Insert Position C++ Note Easy
35 Valid Sudoku C++ Note Medium
36 Sudoku Solver C++ Note Hard
37 Count and Say C++ Note Easy
38 Combination Sum C++ Note Medium
39 Combination Sum II C++ Note Medium
40 First Missing Positive C++ Note Hard
41 Trapping Rain Water C++ Note Hard
42 Multiply Strings C++ Note Medium
43 Wildcard Matching C++ Note Hard
44 Jump Game II C++ Note Hard
45 Permutations C++ Note Medium
46 Permutations II C++ Note Medium
47 Rotate Image C++ Note Medium
48 Group Anagrams C++ Note Medium
49 Pow(x, n) C++ Note Medium
50 N-Queens C++ Note Hard
51 N-Queens II C++ Note Hard
52 Maximum Subarray C++ Note Easy
53 Spiral Matrix C++ Note Medium
54 Jump Game C++ Note Medium
55 Merge Intervals C++ Note Medium
56 Insert Interval C++ Note Hard
57 Length of Last Word C++ Note Easy
58 Spiral Matrix II C++ Note Medium
59 Permutation Sequence C++ Note Medium
60 Rotate List C++ Note Medium
61 Unique Paths C++ Note Medium
62 Unique Paths II C++ Note Medium
63 Minimum Path Sum C++ Note Medium
64 Valid Number C++ Note Hard
65 Plus One C++ Note Easy
66 Add Binary C++ Note Easy
67 Text Justification C++ Note Hard
68 Sqrt(x) C++ Note Easy
69 Climbing Stairs C++ Note Easy
70 Simplify Path C++ Note Medium
71 Edit Distance C++ Note Hard
72 Set Matrix Zeroes C++ Note Medium
73 Search a 2D Matrix C++ Note Medium
74 Sort Colors C++ Note Medium
75 Minimum Window Substring C++ Note Hard
76 Combinations C++ Note Medium
77 Subsets C++ Note Medium
78 Word Search C++ Note Medium
79 Remove Duplicates from Sorted Array II C++ Note Medium
80 Search in Rotated Sorted Array II C++ Note Medium
81 Remove Duplicates from Sorted List II C++ Note Medium
82 Remove Duplicates from Sorted List C++ Note Easy
83 Largest Rectangle in Histogram C++ Note Hard
84 Maximal Rectangle C++ Note Hard
85 Partition List C++ Note Medium
86 Scramble String C++ Note Hard
87 Merge Sorted Array C++ Note Easy
88 Gray Code C++ Note Medium
89 Subsets II C++ Note Medium
90 Decode Ways C++ Note Medium
91 Reverse Linked List II C++ Note Medium
92 Restore IP Addresses C++ Note Medium
93 Binary Tree Inorder Traversal C++ Note Medium
94 Unique Binary Search Trees II C++ Note Medium
95 Unique Binary Search Trees C++ Note Medium
96 Interleaving String C++ Note Hard
97 Validate Binary Search Tree C++ Note Medium
98 Recover Binary Search Tree C++ Note Hard
99 Same Tree C++ Note Easy
100 Symmetric Tree C++ Note Easy
101 Binary Tree Level Order Traversal C++ Note Medium
102 Binary Tree Zigzag Level Order Traversal C++ Note Medium
103 Maximum Depth of Binary Tree C++ Note Easy
104 Construct Binary Tree from Preorder and Inorder Traversal C++ Note Medium
105 Construct Binary Tree from Inorder and Postorder Traversal C++ Note Medium
106 Binary Tree Level Order Traversal II C++ Note Easy
107 Convert Sorted Array to Binary Search Tree C++ Note Easy
108 Convert Sorted List to Binary Search Tree C++ Note Medium
109 Balanced Binary Tree C++ Note Easy
110 Minimum Depth of Binary Tree C++ Note Easy
111 Path Sum C++ Note Easy
112 Path Sum II C++ Note Medium
113 Flatten Binary Tree to Linked List C++ Note Medium
114 Distinct Subsequences C++ Note Hard
115 Populating Next Right Pointers in Each Node C++ Note Medium
116 Populating Next Right Pointers in Each Node II C++ Note Medium
117 Pascal's Triangle C++ Note Easy
118 Pascal's Triangle II C++ Note Easy
119 Triangle C++ Note Medium
120 Best Time to Buy and Sell Stock C++ Note Easy
121 Best Time to Buy and Sell Stock II C++ Note Easy
122 Best Time to Buy and Sell Stock III C++ Note Hard
123 Binary Tree Maximum Path Sum C++ Note Hard
124 Valid Palindrome C++ Note Easy
125 Word Ladder II C++ Note Hard
126 Word Ladder C++ Note Medium
127 Longest Consecutive Sequence C++ Note Hard
128 Sum Root to Leaf Numbers C++ Note Medium
129 Surrounded Regions C++ Note Medium
130 Palindrome Partitioning C++ Note Medium
131 Palindrome Partitioning II C++ Note Hard
132 Clone Graph C++ Note Medium
133 Gas Station C++ Note Medium
134 Candy C++ Note Hard
135 Single Number C++ Note Easy
136 Single Number II C++ Note Medium
137 Copy List with Random Pointer C++ Note Medium
138 Word Break C++ Note Medium
139 Word Break II C++ Note Hard
140 Linked List Cycle C++ Note Easy
141 Linked List Cycle II C++ Note Medium
142 Reorder List C++ Note Medium
143 Binary Tree Preorder Traversal C++ Note Medium
144 Binary Tree Postorder Traversal C++ Note Hard
145 LRU Cache C++ Note Hard
146 Insertion Sort List C++ Note Medium
147 Sort List C++ Note Medium
148 Max Points on a Line C++ Note Hard
149 Evaluate Reverse Polish Notation C++ Note Medium
150 Reverse Words in a String C++ Note Medium
151 Maximum Product Subarray C++ Note Medium
152 Find Minimum in Rotated Sorted Array C++ Note Medium
153 Find Minimum in Rotated Sorted Array II C++ Note Hard
154 Min Stack C++ Note Easy
155 Binary Tree Upside Down C++ Note None
156 Read N Characters Given Read4 C++ Note None
157 Read N Characters Given Read4 II - Call multiple times C++ Note None
158 Longest Substring with At Most Two Distinct Characters C++ Note None
159 Intersection of Two Linked Lists C++ Note Easy
160 One Edit Distance C++ Note None
161 Find Peak Element C++ Note Medium
162 Missing Ranges C++ Note None
163 Maximum Gap C++ Note Hard
164 Compare Version Numbers C++ Note Medium
165 Fraction to Recurring Decimal C++ Note Medium
166 Two Sum II - Input array is sorted C++ Note Easy
167 Excel Sheet Column Title C++ Note Easy
168 Majority Element C++ Note Easy
169 Two Sum III - Data structure design C++ Note None
170 Excel Sheet Column Number C++ Note Easy
171 Factorial Trailing Zeroes C++ Note Easy
172 Binary Search Tree Iterator C++ Note Medium
173 Dungeon Game C++ Note Hard
174 Combine Two Tables C++ Note Easy
175 Second Highest Salary C++ Note Easy
176 Nth Highest Salary C++ Note Medium
177 Rank Scores C++ Note Medium
178 Largest Number C++ Note Medium
179 Consecutive Numbers C++ Note Medium
180 Employees Earning More Than Their Managers C++ Note Easy
181 Duplicate Emails C++ Note Easy
182 Customers Who Never Order C++ Note Easy
183 Department Highest Salary C++ Note Medium
184 Department Top Three Salaries C++ Note Hard
185 Reverse Words in a String II C++ Note None
186 Repeated DNA Sequences C++ Note Medium
187 Best Time to Buy and Sell Stock IV C++ Note Hard
188 Rotate Array C++ Note Easy
189 Reverse Bits C++ Note Easy
190 Number of 1 Bits C++ Note Easy
191 Word Frequency C++ Note Medium
192 Valid Phone Numbers C++ Note Easy
193 Transpose File C++ Note Medium
194 Tenth Line C++ Note Easy
195 Delete Duplicate Emails C++ Note Easy
196 Rising Temperature C++ Note Easy
197 House Robber C++ Note Easy
198 Binary Tree Right Side View C++ Note Medium
199 Number of Islands C++ Note Medium
200 Bitwise AND of Numbers Range C++ Note Medium
201 Happy Number C++ Note Easy
202 Remove Linked List Elements C++ Note Easy
203 Count Primes C++ Note Easy
204 Isomorphic Strings C++ Note Easy
205 Reverse Linked List C++ Note Easy
206 Course Schedule C++ Note Medium
207 Implement Trie (Prefix Tree) C++ Note Medium
208 Minimum Size Subarray Sum C++ Note Medium
209 Course Schedule II C++ Note Medium
210 Add and Search Word - Data structure design C++ Note Medium
211 Word Search II C++ Note Hard
212 House Robber II C++ Note Medium
213 Shortest Palindrome C++ Note Hard
214 Kth Largest Element in an Array C++ Note Medium
215 Combination Sum III C++ Note Medium
216 Contains Duplicate C++ Note Easy
217 The Skyline Problem C++ Note Hard
218 Contains Duplicate II C++ Note Easy
219 Contains Duplicate III C++ Note Medium
220 Maximal Square C++ Note Medium
221 Count Complete Tree Nodes C++ Note Medium
222 Rectangle Area C++ Note Medium
223 Basic Calculator C++ Note Hard
224 Implement Stack using Queues C++ Note Easy
225 Invert Binary Tree C++ Note Easy
226 Basic Calculator II C++ Note Medium
227 Summary Ranges C++ Note Medium
228 Majority Element II C++ Note Medium
229 Kth Smallest Element in a BST C++ Note Medium
230 Power of Two C++ Note Easy
231 Implement Queue using Stacks C++ Note Easy
232 Number of Digit One C++ Note Hard
233 Palindrome Linked List C++ Note Easy
234 Lowest Common Ancestor of a Binary Search Tree C++ Note Easy
235 Lowest Common Ancestor of a Binary Tree C++ Note Medium
236 Delete Node in a Linked List C++ Note Easy
237 Product of Array Except Self C++ Note Medium
238 Sliding Window Maximum C++ Note Hard
239 Search a 2D Matrix II C++ Note Medium
240 Different Ways to Add Parentheses C++ Note Medium
241 Valid Anagram C++ Note Easy
242 Shortest Word Distance C++ Note None
243 Shortest Word Distance II C++ Note None
244 Shortest Word Distance III C++ Note None
245 Strobogrammatic Number C++ Note None
246 Strobogrammatic Number II C++ Note None
247 Strobogrammatic Number III C++ Note None
248 Group Shifted Strings C++ Note None
249 Count Univalue Subtrees C++ Note None
250 Flatten 2D Vector C++ Note None
251 Meeting Rooms C++ Note None
252 Meeting Rooms II C++ Note None
253 Factor Combinations C++ Note None
254 Verify Preorder Sequence in Binary Search Tree C++ Note None
255 Paint House C++ Note None
256 Binary Tree Paths C++ Note Easy
257 Add Digits C++ Note Easy
258 3Sum Smaller C++ Note None
259 Single Number III C++ Note Medium
260 Graph Valid Tree C++ Note None
261 Trips and Users C++ Note Hard
262 Ugly Number C++ Note Easy
263 Ugly Number II C++ Note Medium
264 Paint House II C++ Note None
265 Palindrome Permutation C++ Note None
266 Palindrome Permutation II C++ Note None
267 Missing Number C++ Note Easy
268 Alien Dictionary C++ Note None
269 Closest Binary Search Tree Value C++ Note None
270 Encode and Decode Strings C++ Note None
271 Closest Binary Search Tree Value II C++ Note None
272 Integer to English Words C++ Note Hard
273 H-Index C++ Note Medium
274 H-Index II C++ Note Medium
275 Paint Fence C++ Note None
276 Find the Celebrity C++ Note None
277 First Bad Version C++ Note Easy
278 Perfect Squares C++ Note Medium
279 Wiggle Sort C++ Note None
280 Zigzag Iterator C++ Note None
281 Expression Add Operators C++ Note Hard
282 Move Zeroes C++ Note Easy
283 Peeking Iterator C++ Note Medium
284 Inorder Successor in BST C++ Note None
285 Walls and Gates C++ Note None
286 Find the Duplicate Number C++ Note Medium
287 Unique Word Abbreviation C++ Note None
288 Game of Life C++ Note Medium
289 Word Pattern C++ Note Easy
290 Word Pattern II C++ Note None
291 Nim Game C++ Note Easy
292 Flip Game C++ Note None
293 Flip Game II C++ Note None
294 Find Median from Data Stream C++ Note Hard
295 Best Meeting Point C++ Note None
296 Serialize and Deserialize Binary Tree C++ Note Hard
297 Binary Tree Longest Consecutive Sequence C++ Note None
298 Bulls and Cows C++ Note Medium
299 Longest Increasing Subsequence C++ Note Medium
300 Remove Invalid Parentheses C++ Note Hard
301 Smallest Rectangle Enclosing Black Pixels C++ Note None
302 Range Sum Query - Immutable C++ Note Easy
303 Range Sum Query 2D - Immutable C++ Note Medium
304 Number of Islands II C++ Note None
305 Additive Number C++ Note Medium
306 Range Sum Query - Mutable C++ Note Medium
307 Range Sum Query 2D - Mutable C++ Note None
308 Best Time to Buy and Sell Stock with Cooldown C++ Note Medium
309 Minimum Height Trees C++ Note Medium
310 Sparse Matrix Multiplication C++ Note None
311 Burst Balloons C++ Note Hard
312 Super Ugly Number C++ Note Medium
313 Binary Tree Vertical Order Traversal C++ Note None
314 Count of Smaller Numbers After Self C++ Note Hard
315 Remove Duplicate Letters C++ Note Hard
316 Shortest Distance from All Buildings C++ Note None
317 Maximum Product of Word Lengths C++ Note Medium
318 Bulb Switcher C++ Note Medium
319 Generalized Abbreviation C++ Note None
320 Create Maximum Number C++ Note Hard
321 Coin Change C++ Note Medium
322 Number of Connected Components in an Undirected Graph C++ Note None
323 Wiggle Sort II C++ Note Medium
324 Maximum Size Subarray Sum Equals k C++ Note None
325 Power of Three C++ Note Easy
326 Count of Range Sum C++ Note Hard
327 Odd Even Linked List C++ Note Medium
328 Longest Increasing Path in a Matrix C++ Note Hard
329 Patching Array C++ Note Hard
330 Verify Preorder Serialization of a Binary Tree C++ Note Medium
331 Reconstruct Itinerary C++ Note Medium
332 Largest BST Subtree C++ Note None
333 Increasing Triplet Subsequence C++ Note Medium
334 Self Crossing C++ Note Hard
335 Palindrome Pairs C++ Note Hard
336 House Robber III C++ Note Medium
337 Counting Bits C++ Note Medium
338 Nested List Weight Sum C++ Note None
339 Longest Substring with At Most K Distinct Characters C++ Note None
340 Flatten Nested List Iterator C++ Note Medium
341 Power of Four C++ Note Easy
342 Integer Break C++ Note Medium
343 Reverse String C++ Note Easy
344 Reverse Vowels of a String C++ Note Easy
345 Moving Average from Data Stream C++ Note None
346 Top K Frequent Elements C++ Note Medium
347 Design Tic-Tac-Toe C++ Note None
348 Intersection of Two Arrays C++ Note Easy
349 Intersection of Two Arrays II C++ Note Easy
350 Android Unlock Patterns C++ Note None
351 Data Stream as Disjoint Intervals C++ Note Hard
352 Design Snake Game C++ Note None
353 Russian Doll Envelopes C++ Note Hard
354 Design Twitter C++ Note Medium
355 Line Reflection C++ Note None
356 Count Numbers with Unique Digits C++ Note Medium
357 Rearrange String k Distance Apart C++ Note None
358 Logger Rate Limiter C++ Note None
359 Sort Transformed Array C++ Note None
360 Bomb Enemy C++ Note None
361 Design Hit Counter C++ Note None
362 Max Sum of Rectangle No Larger Than K C++ Note Hard
363 Nested List Weight Sum II C++ Note None
364 Water and Jug Problem C++ Note Medium
365 Find Leaves of Binary Tree C++ Note None
366 Valid Perfect Square C++ Note Easy
367 Largest Divisible Subset C++ Note Medium
368 Plus One Linked List C++ Note None
369 Range Addition C++ Note None
370 Sum of Two Integers C++ Note Easy
371 Super Pow C++ Note Medium
372 Find K Pairs with Smallest Sums C++ Note Medium
373 Guess Number Higher or Lower C++ Note Easy
374 Guess Number Higher or Lower II C++ Note Medium
375 Wiggle Subsequence C++ Note Medium
376 Combination Sum IV C++ Note Medium
377 Kth Smallest Element in a Sorted Matrix C++ Note Medium
378 Design Phone Directory C++ Note None
379 Insert Delete GetRandom O(1) C++ Note Medium
380 Insert Delete GetRandom O(1) - Duplicates allowed C++ Note Hard
381 Linked List Random Node C++ Note Medium
382 Ransom Note C++ Note Easy
383 Shuffle an Array C++ Note Medium
384 Mini Parser C++ Note Medium
385 Lexicographical Numbers C++ Note Medium
386 First Unique Character in a String C++ Note Easy
387 Longest Absolute File Path C++ Note Medium
388 Find the Difference C++ Note Easy
389 Elimination Game C++ Note Medium
390 Perfect Rectangle C++ Note Hard
391 Is Subsequence C++ Note Medium
392 UTF-8 Validation C++ Note Medium
393 Decode String C++ Note Medium
394 Longest Substring with At Least K Repeating Characters C++ Note Medium
395 Rotate Function C++ Note Medium
396 Integer Replacement C++ Note Medium
397 Random Pick Index C++ Note Medium
398 Evaluate Division C++ Note Medium
399 Nth Digit C++ Note Easy
400 Binary Watch C++ Note Easy
401 Remove K Digits C++ Note Medium
402 Frog Jump C++ Note Hard
403 Sum of Left Leaves C++ Note Easy
404 Convert a Number to Hexadecimal C++ Note Easy
405 Queue Reconstruction by Height C++ Note Medium
406 Trapping Rain Water II C++ Note Hard
407 Valid Word Abbreviation C++ Note None
408 Longest Palindrome C++ Note Easy
409 Split Array Largest Sum C++ Note Hard
410 Minimum Unique Word Abbreviation C++ Note None
411 Fizz Buzz C++ Note Easy
412 Arithmetic Slices C++ Note Medium
413 Third Maximum Number C++ Note Easy
414 Add Strings C++ Note Easy
415 Partition Equal Subset Sum C++ Note Medium
416 Pacific Atlantic Water Flow C++ Note Medium
417 Sentence Screen Fitting C++ Note None
418 Battleships in a Board C++ Note Medium
419 Strong Password Checker C++ Note Hard
420 Maximum XOR of Two Numbers in an Array C++ Note Medium
421 Valid Word Square C++ Note None
422 Reconstruct Original Digits from English C++ Note Medium
423 Longest Repeating Character Replacement C++ Note Medium
424 Word Squares C++ Note None
425 All O'one Data Structure C++ Note Hard
426 Minimum Genetic Mutation C++ Note Medium
427 Number of Segments in a String C++ Note Easy
428 Non-overlapping Intervals C++ Note Medium
429 Find Right Interval C++ Note Medium
430 Path Sum III C++ Note Easy
431 Find All Anagrams in a String C++ Note Easy
432 Ternary Expression Parser C++ Note None
433 K-th Smallest in Lexicographical Order C++ Note Hard
434 Arranging Coins C++ Note Easy
435 Find All Duplicates in an Array C++ Note Medium
436 String Compression C++ Note Easy
437 Sequence Reconstruction C++ Note None
438 Add Two Numbers II C++ Note Medium
439 Arithmetic Slices II - Subsequence C++ Note Hard
440 Number of Boomerangs C++ Note Easy
441 Find All Numbers Disappeared in an Array C++ Note Easy
442 Serialize and Deserialize BST C++ Note Medium
443 Delete Node in a BST C++ Note Medium
444 Sort Characters By Frequency C++ Note Medium
445 Minimum Number of Arrows to Burst Balloons C++ Note Medium
446 Minimum Moves to Equal Array Elements C++ Note Easy
447 4Sum II C++ Note Medium
448 Assign Cookies C++ Note Easy
449 132 Pattern C++ Note Medium
450 Circular Array Loop C++ Note Medium
451 Poor Pigs C++ Note Easy
452 Repeated Substring Pattern C++ Note Easy
453 LFU Cache C++ Note Hard
454 Hamming Distance C++ Note Easy
455 Minimum Moves to Equal Array Elements II C++ Note Medium
456 Island Perimeter C++ Note Easy
457 Can I Win C++ Note Medium
458 Optimal Account Balancing C++ Note None
459 Count The Repetitions C++ Note Hard
460 Unique Substrings in Wraparound String C++ Note Medium
461 Validate IP Address C++ Note Medium
462 Convex Polygon C++ Note None
463 Encode String with Shortest Length C++ Note None
464 Concatenated Words C++ Note Hard
465 Matchsticks to Square C++ Note Medium
466 Ones and Zeroes C++ Note Medium
467 Heaters C++ Note Easy
468 Number Complement C++ Note Easy
469 Total Hamming Distance C++ Note Medium
470 Largest Palindrome Product C++ Note Easy
471 Sliding Window Median C++ Note Hard
472 Magical String C++ Note Medium
473 License Key Formatting C++ Note Easy
474 Smallest Good Base C++ Note Hard
475 Find Permutation C++ Note None
476 Max Consecutive Ones C++ Note Easy
477 Predict the Winner C++ Note Medium
478 Max Consecutive Ones II C++ Note None
479 Zuma Game C++ Note Hard
480 The Maze C++ Note None
481 Increasing Subsequences C++ Note Medium
482 Construct the Rectangle C++ Note Easy
483 Reverse Pairs C++ Note Hard
484 Target Sum C++ Note Medium
485 Teemo Attacking C++ Note Medium
486 Next Greater Element I C++ Note Easy
487 Diagonal Traverse C++ Note Medium
488 The Maze III C++ Note None
489 Keyboard Row C++ Note Easy
490 Find Mode in Binary Search Tree C++ Note Easy
491 IPO C++ Note Hard
492 Next Greater Element II C++ Note Medium
493 Base 7 C++ Note Easy
494 The Maze II C++ Note None
495 Relative Ranks C++ Note Easy
496 Perfect Number C++ Note Easy
497 Most Frequent Subtree Sum C++ Note Medium
498 Find Bottom Left Tree Value C++ Note Medium
499 Freedom Trail C++ Note Hard
500 Find Largest Value in Each Tree Row C++ Note Medium
501 Longest Palindromic Subsequence C++ Note Medium
502 Super Washing Machines C++ Note Hard
503 Coin Change 2 C++ Note Medium
504 Detect Capital C++ Note Easy
505 Longest Uncommon Subsequence I C++ Note Easy
506 Longest Uncommon Subsequence II C++ Note Medium
507 Continuous Subarray Sum C++ Note Medium
508 Longest Word in Dictionary through Deleting C++ Note Medium
509 Contiguous Array C++ Note Medium
510 Beautiful Arrangement C++ Note Medium
511 Word Abbreviation C++ Note None
512 Minesweeper C++ Note Medium
513 Minimum Absolute Difference in BST C++ Note Easy
514 Lonely Pixel I C++ Note None
515 K-diff Pairs in an Array C++ Note Easy
516 Lonely Pixel II C++ Note None
517 Design TinyURL C++ Note Medium
518 Encode and Decode TinyURL C++ Note Medium
519 Construct Binary Tree from String C++ Note None
520 Complex Number Multiplication C++ Note Medium
521 Convert BST to Greater Tree C++ Note Easy
522 Minimum Time Difference C++ Note Medium
523 Single Element in a Sorted Array C++ Note Medium
524 Reverse String II C++ Note Easy
525 01 Matrix C++ Note Medium
526 Diameter of Binary Tree C++ Note Easy
527 Output Contest Matches C++ Note None
528 Boundary of Binary Tree C++ Note None
529 Remove Boxes C++ Note Hard
530 Friend Circles C++ Note Medium
531 Split Array with Equal Sum C++ Note None
532 Binary Tree Longest Consecutive Sequence II C++ Note None
533 Student Attendance Record I C++ Note Easy
534 Student Attendance Record II C++ Note Hard
535 Optimal Division C++ Note Medium
536 Brick Wall C++ Note Medium
537 Split Concatenated Strings C++ Note None
538 Next Greater Element III C++ Note Medium
539 Reverse Words in a String III C++ Note Easy
540 Subarray Sum Equals K C++ Note Medium
541 Array Partition I C++ Note Easy
542 Longest Line of Consecutive One in Matrix C++ Note None
543 Binary Tree Tilt C++ Note Easy
544 Find the Closest Palindrome C++ Note Hard
545 Array Nesting C++ Note Medium
546 Reshape the Matrix C++ Note Easy
547 Permutation in String C++ Note Medium
548 Maximum Vacation Days C++ Note None
549 Median Employee Salary C++ Note None
550 Managers with at Least 5 Direct Reports C++ Note None
551 Find Median Given Frequency of Numbers C++ Note None
552 Subtree of Another Tree C++ Note Easy
553 Squirrel Simulation C++ Note None
554 Winning Candidate C++ Note None
555 Distribute Candies C++ Note Easy
556 Out of Boundary Paths C++ Note Medium
557 Employee Bonus C++ Note None
558 Get Highest Answer Rate Question C++ Note None
559 Find Cumulative Salary of an Employee C++ Note None
560 Count Student Number in Departments C++ Note None
561 Shortest Unsorted Continuous Subarray C++ Note Easy
562 Kill Process C++ Note None
563 Delete Operation for Two Strings C++ Note Medium
564 Find Customer Referee C++ Note None
565 Investments in 2016 C++ Note None
566 Customer Placing the Largest Number of Orders C++ Note None
567 Erect the Fence C++ Note Hard
568 Design In-Memory File System C++ Note None
569 Tag Validator C++ Note Hard
570 Fraction Addition and Subtraction C++ Note Medium
571 Valid Square C++ Note Medium
572 Longest Harmonious Subsequence C++ Note Easy
573 Big Countries C++ Note Easy
574 Classes More Than 5 Students C++ Note Easy
575 Friend Requests I: Overall Acceptance Rate C++ Note None
576 Range Addition II C++ Note Easy
577 Minimum Index Sum of Two Lists C++ Note Easy
578 Non-negative Integers without Consecutive Ones C++ Note Hard
579 Human Traffic of Stadium C++ Note Hard
580 Friend Requests II: Who Has the Most Friends C++ Note None
581 Consecutive Available Seats C++ Note None
582 Design Compressed String Iterator C++ Note None
583 Can Place Flowers C++ Note Easy
584 Construct String from Binary Tree C++ Note Easy
585 Sales Person C++ Note None
586 Tree Node C++ Note None
587 Find Duplicate File in System C++ Note Medium
588 Triangle Judgement C++ Note None
589 Valid Triangle Number C++ Note Medium
590 Shortest Distance in a Plane C++ Note None
591 Shortest Distance in a Line C++ Note None
592 Second Degree Follower C++ Note None
593 Average Salary: Departments VS Company C++ Note None
594 Add Bold Tag in String C++ Note None
595 Merge Two Binary Trees C++ Note Easy
596 Students Report By Geography C++ Note None
597 Biggest Single Number C++ Note None
598 Not Boring Movies C++ Note Easy
599 Task Scheduler C++ Note Medium
600 Add One Row to Tree C++ Note Medium
601 Maximum Distance in Arrays C++ Note None
602 Minimum Factorization C++ Note None
603 Exchange Seats C++ Note Medium
604 Swap Salary C++ Note Easy
605 Maximum Product of Three Numbers C++ Note Easy
606 K Inverse Pairs Array C++ Note Hard
607 Course Schedule III C++ Note Hard
608 Design Excel Sum Formula C++ Note None
609 Smallest Range C++ Note Hard
610 Sum of Square Numbers C++ Note Easy
611 Find the Derangement of An Array C++ Note None
612 Design Log Storage System C++ Note None
613 Exclusive Time of Functions C++ Note Medium
614 Average of Levels in Binary Tree C++ Note Easy
615 Shopping Offers C++ Note Medium
616 Decode Ways II C++ Note Hard
617 Solve the Equation C++ Note Medium
618 Design Search Autocomplete System C++ Note None
619 Maximum Average Subarray I C++ Note Easy
620 Maximum Average Subarray II C++ Note None
621 Set Mismatch C++ Note Easy
622 Maximum Length of Pair Chain C++ Note Medium
623 Palindromic Substrings C++ Note Medium
624 Replace Words C++ Note Medium
625 Dota2 Senate C++ Note Medium
626 2 Keys Keyboard C++ Note Medium
627 4 Keys Keyboard C++ Note None
628 Find Duplicate Subtrees C++ Note Medium
629 Two Sum IV - Input is a BST C++ Note Easy
630 Maximum Binary Tree C++ Note Medium
631 Print Binary Tree C++ Note Medium
632 Coin Path C++ Note None
633 Judge Route Circle C++ Note Easy
634 Find K Closest Elements C++ Note Medium
635 Split Array into Consecutive Subsequences C++ Note Medium
636 Remove 9 C++ Note None
637 Image Smoother C++ Note Easy
638 Maximum Width of Binary Tree C++ Note Medium
639 Equal Tree Partition C++ Note None
640 Strange Printer C++ Note Hard
641 Non-decreasing Array C++ Note Easy
642 Path Sum IV C++ Note None
643 Beautiful Arrangement II C++ Note Medium
644 Kth Smallest Number in Multiplication Table C++ Note Hard
645 Trim a Binary Search Tree C++ Note Easy
646 Maximum Swap C++ Note Medium
647 Second Minimum Node In a Binary Tree C++ Note Easy
648 Bulb Switcher II C++ Note Medium
649 Number of Longest Increasing Subsequence C++ Note Medium
650 Longest Continuous Increasing Subsequence C++ Note Easy
651 Cut Off Trees for Golf Event C++ Note Hard
652 Implement Magic Dictionary C++ Note Medium
653 Map Sum Pairs C++ Note Medium
654 Valid Parenthesis String C++ Note Medium
655 24 Game C++ Note Hard
656 Valid Palindrome II C++ Note Easy
657 Next Closest Time C++ Note None
658 Baseball Game C++ Note Easy
659 K Empty Slots C++ Note None
660 Redundant Connection C++ Note Medium
661 Redundant Connection II C++ Note Hard
662 Repeated String Match C++ Note Easy
663 Longest Univalue Path C++ Note Easy
664 Knight Probability in Chessboard C++ Note Medium
665 Maximum Sum of 3 Non-Overlapping Subarrays C++ Note Hard
666 Employee Importance C++ Note Easy
667 Stickers to Spell Word C++ Note Hard
668 Top K Frequent Words C++ Note Medium
669 Binary Number with Alternating Bits C++ Note Easy
670 Number of Distinct Islands C++ Note None
671 Max Area of Island C++ Note Easy
672 Count Binary Substrings C++ Note Easy
673 Degree of an Array C++ Note Easy
674 Partition to K Equal Sum Subsets C++ Note Medium
675 Falling Squares C++ Note Hard
676 Number of Distinct Islands II C++ Note None
677 Minimum ASCII Delete Sum for Two Strings C++ Note Medium
678 Subarray Product Less Than K C++ Note Medium
679 Best Time to Buy and Sell Stock with Transaction Fee C++ Note Medium
680 Range Module C++ Note Hard
681 Max Stack C++ Note None
682 1-bit and 2-bit Characters C++ Note Easy
683 Maximum Length of Repeated Subarray C++ Note Medium
684 Find K-th Smallest Pair Distance C++ Note Hard
685 Longest Word in Dictionary C++ Note Easy
686 Accounts Merge C++ Note Medium
687 Remove Comments C++ Note Medium
688 Candy Crush C++ Note None
689 Find Pivot Index C++ Note Easy
690 Split Linked List in Parts C++ Note Medium
691 Number of Atoms C++ Note Hard
692 Minimum Window Subsequence C++ Note None
693 Self Dividing Numbers C++ Note Easy
694 My Calendar I C++ Note Medium
695 Count Different Palindromic Subsequences C++ Note Hard
696 My Calendar II C++ Note Medium
697 My Calendar III C++ Note Hard
698 Flood Fill C++ Note Easy
699 Sentence Similarity C++ Note Easy
700 Asteroid Collision C++ Note Medium
701 Parse Lisp Expression C++ Note Hard
702 Sentence Similarity II C++ Note Medium
703 Monotone Increasing Digits C++ Note Medium
704 Daily Temperatures C++ Note Medium
705 Delete and Earn C++ Note Medium
706 Cherry Pickup C++ Note Hard
707 Closest Leaf in a Binary Tree C++ Note New
708 Network Delay Time C++ Note New
709 Find Smallest Letter Greater Than Target C++ Note New
710 Prefix and Suffix Search C++ Note New

About

LeetCode solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages