Skip to content

MrEeeeet111/leetcode-dsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Personal Data Structures & Algorithms Study Progression

Number Problem Difficulty Topic Solution
1 Two Sum Easy Arrays & Hashing #25
2 Add Two Numbers Medium Linked List #90
3 Longest Substring Without Repeating Characters Medium Sliding Window #74
5 Longest Palindromic Substring Medium 1-D Dynamic Programming #193
7 Reverse Integer Medium Bit Manipulation #428
11 Container With Most Water Medium Two Pointers #10
15 3Sum Medium Two Pointers #55
17 Letter Combinations of a Phone Number Medium Backtracking #148
19 Remove Nth Node From End of List Medium Linked List #86
20 Valid Parentheses Easy Stack #14
21 Merge Two Sorted Lists Easy Linked List #82
22 Generate Parentheses Medium Backtracking #136
33 Search in Rotated Sorted Array Medium Binary Search #68
36 Valid Sudoku Medium Arrays & Hashing #35
39 Combination Sum Medium Backtracking #134
40 Combination Sum II Medium Backtracking #142
42 Trapping Rain Water Hard Two Pointers #532
45 Jump Game II Medium Greedy #334
46 Permutations Medium Backtracking #138
47 Permutations II Medium Backtracking #635
49 Group Anagrams Medium Arrays & Hashing #27
53 Maximum Subarray Medium Greedy #320
55 Jump Game Medium Greedy #328
56 Merge Intervals Medium Intervals #283
57 Insert Interval Medium Intervals #281
62 Unique Paths Medium 2-D Dynamic Programming #522
70 Climbing Stairs Easy 1-D Dynamic Programming #185
74 Search a 2D Matrix Medium Binary Search #59
76 Minimum Window Substring Hard Sliding Window #394
78 Subsets Medium Backtracking #132
79 Word Search Medium Backtracking #144
90 Subsets II Medium Backtracking #140
91 Decode Ways Medium 1-D Dynamic Programming #199
98 Validate Binary Search Tree Medium Trees #122
100 Same Tree Easy Trees #110
102 Binary Tree Level Order Traversal Medium Trees #116
104 Maximum Depth of Binary Tree Easy Trees #99
105 Construct Binary Tree from Preorder and Inorder Traversal Medium Trees #124
110 Balanced Binary Tree Easy Trees #108
111 Minimum Depth of Binary Tree Easy Trees #101
121 Best Time to Buy and Sell Stock Easy Sliding Window #72
125 Valid Palindrome Easy Two Pointers #50
127 Word Ladder Hard Graphs #457
128 Longest Consecutive Sequence Medium Arrays & Hashing #38
131 Palindrome Partitioning Medium Backtracking #146
133 Clone Graph Medium Graphs #154
134 Gas Station Medium Greedy #346
136 Single Number Easy Bit Manipulation #223
138 Copy List with Random Pointer Medium Linked List #88
139 Word Break Medium 1-D Dynamic Programming #205
141 Linked List Cycle Medium Linked List #93
143 Reorder List Medium Linked List #84
145 Binary Tree Postorder Traversal Easy Trees #641
146 LRU Cache Medium Linked List #103
150 Evaluate Reverse Polish Notation Medium Stack #44
151 Reverse Words in a String Medium Two Pointers #213
152 Maximum Product Subarray Medium 1-D Dynamic Programming #203
153 Find Minimum in Rotated Sorted Array Medium Binary Search #66
155 Min Stack Medium Stack #42
167 Two Sum II - Input Array Is Sorted Medium Two Pointers #53
175 Combine Two Tables Easy Database #3
176 Second Highest Salary Easy Database #4
177 Nth Highest Salary Medium Database #5
181 Employees Earning More Than Their Managers Easy Database #6
182 Duplicate Emails Easy Database #7
183 Customers Who Never Order Easy Database #8
190 Reverse Bits Easy Bit Manipulation #231
191 Number of 1 Bits Easy Bit Manipulation #225
193 Valid Phone Numbers Easy Shell #19
195 Tenth Line Easy Shell #15
197 Rising Temperature Easy Database #9
198 House Robber Medium 1-D Dynamic Programming #189
199 Binary Tree Right Side View Medium Trees #118
200 Number of Islands Medium Graphs #150
206 Reverse Linked List Easy Linked List #80
207 Course Schedule Medium Graphs #163
208 Implement Trie (Prefix Tree) Medium Tries #128
209 Minimum Size Subarray Sum Medium Sliding Window #643
210 Course Schedule II Medium Graphs #165
211 Design Add and Search Words Data Structure) Medium Tries #130
212 Word Search II Hard Tries #255
213 House Robber II Medium 1-D Dynamic Programming #191
214 Shortest Palindrome Hard Strings #242
215 Kth Largest Element in an Array Medium Heap / Priority Queue #179
217 Contains Duplicate Easy Arrays & Hashing #21
226 Invert Binary Tree Easy Trees #97
230 Kth Smallest Element in a BST Medium Trees #126
235 Lowest Common Ancestor of a Binary Search Tree Medium Trees #114
236 Lowest Common Ancestor of a Binary Tree Medium Trees #647
238 Product of Array Except Self Medium Prefix Sum #32
241 Different Ways to Add Parentheses Medium Backtracking #240
242 Valid Anagram Easy Arrays & Hashing #23
252 Meeting Rooms Easy Intervals #292
253 Meeting Rooms II Medium Intervals #298
261 Graph Valid Tree Medium Graphs #167
266 Palindrome Permutation Easy Arrays & Hashing #605
268 Missing Number Easy Bit Manipulation #368
269 Alien Dictionary Hard Graphs #492
271 Encode and Decode Strings Medium Arrays & Hashing #61
279 Perfect Squares Medium 1D Dynamic Programming #510
286 Walls and Gates Medium Graphs #161
287 Find the Duplicate Number Medium Linked List #95
300 Longest Increasing Subsequence Medium 1-D Dynamic Programming #207
309 Best Time to Buy and Sell Stock with Cooldown Medium 2-D Dynamic Programming #528
322 Coin Change Medium 1-D Dynamic Programming #201
323 Number of Connected Components in an Undirected Graph Medium Graphs #169
332 Reconstruct Itinerary Hard Graphs #445
344 Reverse String Easy Two Pointers #645
347 Top K Frequent Elements Medium Arrays & Hashing #30
355 Design Twitter Medium Heap / Priority Queue #183
371 Sum of Two Integers Medium Bit Manipulation #406
386 Lexicographical Numbers Medium Tries #244
399 Evaluate Division Medium Graphs #195
412 Fizz Buzz Easy Strings #409
416 Partition Equal Subset Sum Medium 1-D Dynamic Programming #209
417 Pacific Atlantic Water Flow Medium Graphs #158
424 Longest Repeating Character Replacement Medium Sliding Window #77
432 All O`one Data Structure Hard Linked List #265
435 Non-overlapping Intervals Medium Intervals #290
440 K-th Smallest in Lexicographical Order Hard Tries #246
494 Target Sum Medium 2-D Dynamic Programming #570
515 Find Largest Value in Each Tree Row Medium Trees #442
518 Coin Change II Medium 2-D Dynamic Programming #546
539 Minimum Time Difference Medium Arrays & Hashing #233
543 Diameter of Binary Tree Easy Trees #105
567 Permutation in String Medium Sliding Window #78
572 Subtree of Another Tree Easy Trees #112
621 Task Scheduler Medium Heap / Priority Queue #181
622 Design Circular Queue Medium Linked List #633
632 Smallest Range Covering Elements from K Lists Hard Heap / Priority Queue #306
641 Design Circular Deque Medium Linked List #263
647 Palindromic Substrings Medium 1-D Dynamic Programming #197
670 Maximum Swap Medium Greedy #314
678 Valid Parenthesis String Medium Greedy #363
684 Redundant Connection Medium Graphs #171
695 Max Area of Island Medium Graphs #152
703 Kth Largest Element in a Stream Easy Heap / Priority Queue #173
704 Binary Search Easy Binary Search #57
729 My Calendar I Medium Trees #257
731 My Calendar II Medium Intervals #261
739 Daily Temperatures Medium Stack #46
743 Network Delay Time Medium Graphs #467
746 Min Cost Climbing Stairs Easy 1-D Dynamic Programming #187
763 Partition Labels Medium Greedy #355
769 Max Chunks To Make Sorted Medium Arrays & Hashing #438
778 Swim in Rising Water Hard Graphs #479
784 Letter Case Permutation Medium Backtracking #1
787 Cheapest Flights Within K Stops Medium Graphs #500
796 Rotate String Easy Strings #359
797 All Paths From Source to Target Medium Graphs #2
827 Making A Large Island Hard Graphs #512
846 Hand of Straights Medium Greedy #350
853 Car Fleet Medium Stack #48
875 Koko Eating Bananas Medium Binary Search #65
884 Uncommon Words from Two Sentences Easy Strings #238
889 Construct Binary Tree from Preorder and Postorder Traversal Medium Trees #569
916 Word Subsets Medium Strings #469
921 Minimum Add to Make Parentheses Valid Medium Stack #294
951 Flip Equivalent Binary Trees Medium Trees #336
962 Maximum Width Ramp Medium Stack #296
973 K Closest Points to Origin Medium Heap / Priority Queue #177
981 Time Based Key-Value Store Medium Binary Search #70
994 Rotting Oranges Medium Graphs #156
997 Find the Town Judge Easy Graphs #629
1014 Best Sightseeing Pair Medium 1D Dynamic Programming #443
1028 Recover a Tree From Preorder Traversal Hard Trees #567
1046 Last Stone Weight Easy Heap / Priority Queue #175
1072 Flip Columns For Maximum Number of Equal Rows Medium Arrays & Hashing #392
1079 Letter Tile Possibilities Medium Backtracking #557
1100 Find K-Length Substrings With No Repeated Characters Medium Sliding Window #591
1123 Lowest Common Ancestor of Deepest Leaves Medium Trees #648
1133 Largest Unique Number Easy Arrays & Hashing #273
1137 N-th Tribonacci Number Easy Dynamic Programming #502
1143 Longest Common Subsequence Medium 2-D Dynamic Programming #526
1213 Intersection of Three Sorted Arrays Easy Arrays & Hashing #380
1233 Remove Sub-Folders from the Filesystem Medium Arrays & Hashing #338
1261 Find Elements in a Contaminated Binary Tree Medium Trees #562
1267 Count Servers that Communicate Medium Arrays & Hashing #498
1277 Count Square Submatrices with All Ones Medium 1D Dynamic Programming #342
1310 XOR Queries of a Subarray Medium Bit Manipulation #227
1331 Rank Transform of an Array Easy Arrays & Hashing #275
1346 Check If N and Its Double Exist Easy Arrays & Hashing #402
1352 Product of the Last K Numbers Medium Prefix Sum #550
1358 Number of Substrings Containing All Three Characters Medium Sliding Window #596
1368 Minimum Cost to Make at Least One Valid Path in a Grid Hard Graphs #485
1371 Find the Longest Substring Containing Vowels in Even Counts Medium Bit Manipulation #235
1381 Design a Stack With Increment Operation Medium Stack #267
1405 Longest Happy String Medium Heap / Priority Queue #312
1406 Stone Game III Hard 1D Dynamic Programming #517
1408 String Matching in an Array Easy Strings #459
1415 The k-th Lexicographical String of All Happy Strings of Length n Medium Backtracking #559
1422 Maximum Score After Splitting a String Easy Prefix Sum #447
1427 Perform String Shifts Easy Strings #454
1429 First Unique Number Medium Arrays & Hashing #326
1448 Count Good Nodes in Binary Tree Medium Trees #120
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence Easy Strings #404
1462 Course Schedule IV Medium Graphs #506
1475 Final Prices With a Special Discount in a Shop Easy Stack #436
1497 Check If Array Pairs Are Divisible by k Medium Arrays & Hashing #271
1524 Number of Sub-arrays With Odd Sum Medium Prefix Sum #576
1545 Find Kth Bit in Nth Binary String Medium Strings #322
1584 Min Cost to Connect All Points Medium Graphs #473
1590 Make Sum Divisible by P Medium Prefix Sum #277
1593 Split a String Into the Max Number of Unique Substrings Medium Backtracking #324
1652 Defuse the Bomb Easy Sliding Window #384
1684 Count the Number of Consistent Strings Easy Arrays & Hashing #221
1718 Construct the Lexicographically Largest Valid Sequence Medium Backtracking #555
1726 Tuple with Same Product Medium Arrays & Hashing #534
1730 Shortest Path to Get Food Medium Graphs #487
1749 Maximum Absolute Sum of Any Subarray Medium 1-D Dynamic Programming #574
1752 Check if Array Is Sorted and Rotated Easy Arrays & Hashing #516
1760 Minimum Limit of Balls in a Bag Medium Binary Search #415
1765 Map of Highest Peak Medium Graphs #496
1769 Minimum Number of Operations to Move All Balls to Each Box Medium Prefix Sum #463
1790 Check if One String Swap Can Make Strings Equal Easy Arrays & Hashing #530
1800 Maximum Ascending Subarray Sum Easy Sliding Window #524
1804 Implement Trie II (Prefix Tree) Medium Tries #269
1813 Sentence Similarity III Medium Two Pointers #285
1829 Maximum XOR for Each Query Medium Bit Manipulation #371
1851 Minimum Interval to Include Each Query Hard Intervals #318
1852 Distinct Numbers in Each Subarray Medium Sliding Window #518
1858 Longest Word With All Prefixes Medium Tries #259
1861 Rotating the Box Medium Arrays & Hashing #398
1863 Sum of All Subset XOR Totals Easy Backtracking #650
1899 Merge Triplets to Form Target Triplet Medium Greedy #353
1910 Remove All Occurrences of a Substring Medium Stack #543
1930 Unique Length-3 Palindromic Subsequences Medium Arrays & Hashing #455
1942 The Number of the Smallest Unoccupied Chair Medium Heap / Priority Queue #302
1957 Delete Characters to Make Fancy String Easy String #351
1963 Minimum Number of Swaps to Make the String Balanced Medium Stack #288
1975 Maximum Matrix Sum Medium Arrays & Hashing #396
1976 Number of Ways to Arrive at Destination Medium Graphs #617
1980 Find Unique Binary String Medium Backtracking #564
2017 Grid Game Medium Prefix Sum #494
2033 Minimum Operations to Make a Uni-Value Grid Medium Math & Geometry #623
2044 Count Number of Maximum Bitwise-OR Subsets Medium Backtracking #316
2109 Adding Spaces to a String Medium Strings #408
2115 Find All Possible Recipes from Given Supplies Medium Graphs #613
2161 Partition Array According to Given Pivot Medium Stack #582
2185 Counting Words With a Given Prefix Easy Strings #465
2206 Divide Array Into Equal Pairs Easy Arrays & Hashing #603
2220 Minimum Bit Flips to Convert Number Easy Bit Manipulation #219
2226 Maximum Candies Allocated to K Children Medium Binary Search #600
2257 Count Unguarded Cells in the Grid Medium Arrays & Hashing #390
2270 Number of Ways to Split Array Medium Prefix Sum #451
2275 Largest Combination With Bitwise AND Greater Than Zero Medium Bit Manipulation #369
2326 Spiral Matrix IV Medium Linked List #215
2337 Move Pieces to Obtain a String Medium Two Pointers #411
2342 Max Sum of a Pair With Equal Sum of Digits Medium Heap / Priority Queue #545
2349 Design a Number Container System Medium Heap / Priority Queue #538
2364 Count Number of Bad Pairs Medium Math & Geometry #540
2375 Construct Smallest Number From DI String Medium Backtracking #554
2379 Minimum Recolors to Get K Consecutive Black Blocks Easy Sliding Window #589
2401 Longest Nice Subarray Medium Bit Manipulation #607
2406 Divide Intervals Into Minimum Number of Groups Medium Heap / Priority Queue #304
2415 Reverse Odd Levels of Binary Tree Medium Trees #440
2416 Sum of Prefix Scores of Strings Hard Tries #253
2419 Longest Subarray With Maximum Bitwise AND Medium Bit Manipulation #229
2425 Bitwise XOR of All Pairings Medium Bit Manipulation #481
2429 Minimize XOR Medium Bit Manipulation #477
2460 Apply Operations to an Array Easy Two Pointers #578
2461 Maximum Sum of Distinct Subarrays With Length K Medium Sliding Window #386
2467 Most Profitable Path in a Tree Medium Trees #572
2490 Circular Sentence Easy Strings #357
2491 Divide Players Into Teams of Equal Skill Medium Arrays & Hashing #279
2501 Longest Square Streak in an Array Medium 1D Dynamic Programming #344
2503 Maximum Number of Points From Grid Queries Hard Graphs #627
2516 Take K of Each Character From Left and Right Medium Sliding Window #388
2523 Closest Prime Numbers in Range Medium Math & Geometry #588
2529 Maximum Count of Positive Integer and Negative Integer Easy Binary Search #598
2530 Maximal Score After Applying K Operations Medium Heap / Priority Queue #308
2554 Maximum Number of Integers to Choose From a Range I Medium Arrays & Hashing #413
2558 Take Gifts From the Richest Pile Easy Heap / Priority Queue #421
2559 Count Vowel Strings in Ranges Medium Prefix Sum #449
2563 Count the Number of Fair Pairs Medium Binary Search #378
2570 Merge Two 2D Arrays by Summing Values Easy Two Pointers #580
2579 Count Total Number of Colored Cells Medium Math & Geometry #584
2583 Kth Largest Sum in a Binary Tree Medium Trees #330
2593 Find Score of an Array After Marking All Elements Medium Heap / Priority Queue #424
2601 Prime Subtraction Operation Medium Greedy #376
2641 Cousins in Binary Tree II Medium Trees #332
2657 Find the Prefix Common Array of Two Arrays Medium Arrays & Hashing #471
2658 Maximum Number of Fish in a Grid Medium Graphs #508
2661 First Completely Painted Row or Column Medium Arrays & Hashing #490
2664 The Knight’s Tour Medium Backtracking #340
2683 Neighboring Bitwise XOR Medium Bit Manipulation #483
2684 Maximum Number of Moves in a Grid Medium 1D Dynamic Programming #348
2685 Count the Number of Complete Components Medium Graphs #615
2696 Minimum String Length After Removing Substrings Easy Stack #286
2698 Find the Punishment Number of an Integer Medium Backtracking #552
2707 Extra Characters in a String Medium 1D Dynamic Programming #249
2737 Find the Closest Marked Node Medium Graphs #631
2762 Continuous Subarrays Medium Heap / Priority Queue #430
2779 Maximum Beauty of an Array After Applying Operation Medium Sliding Window #420
2780 Minimum Index of a Valid Split Medium Arrays & Hashing #625
2807 Insert Greatest Common Divisors in Linked List Medium Linked List #217
2838 Maximum Coins Heroes Can Collect Medium Binary Search #300
2873 Maximum Value of an Ordered Triplet I Easy Greedy #637
2874 Maximum Value of an Ordered Triplet II Medium Greedy #639
2914 Minimum Number of Changes to Make Binary String Beautiful Medium Strings #365
2924 Find Champion II Medium Graph #399
2938 Separate Black and White Balls Medium Two Pointers #310
2948 Make Lexicographically Smallest Array by Swapping Elements Medium Arrays & Hashing #504
2965 Find Missing and Repeated Values Easy Arrays & Hashing #586
2981 Find Longest Special Substring That Occurs Thrice I Medium Sliding Window #426
3011 Find if Array Can Be Sorted Medium Bit Manipulation #367
3042 Count Prefix and Suffix Pairs I Easy Strings #461
3043 Find the Length of the Longest Common Prefix Medium Tries #251
3066 Minimum Operations to Exceed Threshold Value II Medium Heap / Priority Queue #548
3097 Shortest Subarray With OR at Least K II Medium Bit Manipulation #374
3105 Longest Strictly Increasing or Strictly Decreasing Subarray Easy Sliding Window #520
3108 Minimum Cost Walk in Weighted Graph Hard Graphs #611
3151 Special Array I Easy Sliding Window #514
3152 Special Array II Medium Prefix Sum #417
3160 Find the Number of Distinct Colors Among the Balls Medium Arrays & Hashing #536
3163 String Compression III Medium Strings #361
3169 Count Days Without Meetings Medium Intervals #619
3174 Clear Digits Easy Stack #541
3191 Minimum Operations to Make Binary Array Elements Equal to One I Medium Sliding Window #609
3208 Alternating Groups II Medium Sliding Window #594
3217 Delete Nodes From Linked List Present in Array Medium Linked List #211
3223 Minimum Length of String After Operations Medium Arrays & Hashing #475
3254 Find the Power of K-Size Subarrays I Medium Sliding Window #382
3264 Final Array State After K Multiplication Operations I Easy Heap / Priority Queue #432
3394 Check if Grid can be Cut into Sections Medium Intervals #621

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages