Skip to content

Anamicca23/Leetcode-for-DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 Leetcode-for-DSA

A curated collection of LeetCode solutions for mastering Data Structures & Algorithms
Built with ❤️ using LeetHub | Track. Solve. Grow.


📂 Structure

Each folder is named after the LeetCode problem:


📁 0001-two-sum/
┣ 📄 solution.cpp
┣ 📄 solution.java
┗ 📄 solution.py

Problems are sorted by difficulty and topic (Easy / Medium / Hard).


🔧 Tech Stack

  • 💻 Languages: C++, Java, Python
  • 🔁 Sync Tool: LeetHub
  • 📚 Platform: LeetCode

🚀 How to Use

# Step 1: Fork this repo
# Step 2: Clone it locally
git clone https://github.com/your-username/Leetcode-for-DSA.git

# Step 3: Add your own solutions following the naming convention

ARRAY

Easy Level ❤️

📚 Array - two pinter, hash table
# No. Title Link Tags Level
1 26 Remove Duplicates from Sorted Array LC Array, Two Pointers Easy
2 27 Remove Element LC Array, Two Pointers Easy
3 88 Merge Sorted Array LC Array, Two Pointers, Sorting Easy
4 170 Two Sum III - Data Structure Design LC Array, Hash Table, Two Pointers Easy
5 283 Move Zeroes LC Array, Two Pointers Easy
6 349 Intersection of Two Arrays LC Array, Hash Table, Two Pointers Easy
7 350 Intersection of Two Arrays II LC Array, Hash Table, Two Pointers Easy
8 455 Assign Cookies LC Array, Two Pointers, Greedy Easy
9 821 Shortest Distance to a Character LC Array, Two Pointers, String Easy
10 832 Flipping an Image LC Array, Two Pointers, Matrix Easy
11 905 Sort Array By Parity LC Array, Two Pointers, Sorting Easy
12 922 Sort Array By Parity II LC Array, Two Pointers, Sorting Easy
13 942 DI String Match LC Array, Two Pointers, String Easy
14 977 Squares of a Sorted Array LC Array, Two Pointers, Sorting Easy
15 1089 Duplicate Zeros LC Array, Two Pointers Easy
16 1346 Check If N and Its Double Exist LC Array, Hash Table, Two Pointers Easy
17 1385 Find the Distance Value Between Two Arrays LC Array, Two Pointers, Binary Search Easy
18 1826 Faulty Sensor LC Array, Two Pointers Easy
19 2108 Find First Palindromic String in the Array LC Array, Two Pointers, String Easy
20 2367 Number of Arithmetic Triplets LC Array, Hash Table, Two Pointers Easy
21 2441 Largest Positive Integer That Exists With Its Negative LC Array, Hash Table, Two Pointers Easy
22 2465 Number of Distinct Averages LC Array, Hash Table, Two Pointers Easy
23 2511 Maximum Enemy Forts That Can Be Captured LC Array, Two Pointers Easy
24 2540 Minimum Common Value LC Array, Hash Table, Two Pointers Easy
25 2562 Find the Array Concatenation Value LC Array, Two Pointers, Simulation Easy
26 2570 Merge Two 2D Arrays by Summing Values LC Array, Hash Table, Two Pointers Easy
📚 Array - Sliding Window
# No. Title Link Tags Level
1 1004 Max Consecutive Ones III LC Array, Sliding Window, Two Pointers Easy
2 1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold LC Array, Sliding Window Easy
3 1456 Maximum Number of Vowels in a Substring of Given Length LC String, Sliding Window Easy
4 1493 Longest Subarray of 1's After Deleting One Element LC Array, Sliding Window, Dynamic Programming Easy
5 1652 Defuse the Bomb LC Array, Sliding Window Easy
6 1695 Maximum Erasure Value LC Array, Sliding Window, Hash Table Easy
7 1984 Minimum Difference Between Highest and Lowest of K Scores LC Array, Sliding Window, Sorting Easy
8 2024 Maximize the Confusion of an Exam LC String, Sliding Window, Binary Search Easy
9 2270 Number of Ways to Split Array LC Array, Sliding Window, Prefix Sum Easy

Medium Level ❤️❤️❤️

📘 Array - Two Pointer,Sorting , Binary Search , Greedy
# No. Title LC Tags Level
1 11 Container With Most Water LC Array, Two Pointers, Greedy Medium
2 15 3Sum LC Array, Two Pointers, Sorting Medium
3 16 3Sum Closest LC Array, Two Pointers, Sorting Medium
4 18 4Sum LC Array, Two Pointers, Sorting Medium
5 31 Next Permutation LC Array, Two Pointers Medium
6 75 Sort Colors LC Array, Two Pointers, Sorting Medium
7 80 Remove Duplicates from Sorted Array II LC Array, Two Pointers Medium
8 167 Two Sum II - Input Array Is Sorted LC Array, Two Pointers, Binary Search Medium
9 189 Rotate Array LC Array, Math, Two Pointers Medium
10 244 Shortest Word Distance II LC Array, Hash Table, Two Pointers Medium
11 251 Flatten 2D Vector LC Array, Two Pointers, Design Medium
12 253 Meeting Rooms II LC Array, Two Pointers, Greedy Medium
13 259 3Sum Smaller LC Array, Two Pointers, Binary Search Medium
14 287 Find the Duplicate Number LC Array, Two Pointers, Binary Search Medium
15 360 Sort Transformed Array LC Array, Math, Two Pointers Medium
16 457 Circular Array Loop LC Array, Hash Table, Two Pointers Medium
17 475 Heaters LC Array, Two Pointers, Binary Search Medium
18 522 Longest Uncommon Subsequence II LC Array, Hash Table, Two Pointers Medium
19 524 Longest Word in Dictionary through Deleting LC Array, Two Pointers, String Medium
20 532 K-diff Pairs in an Array LC Array, Hash Table, Two Pointers Medium
21 581 Shortest Unsorted Continuous Subarray LC Array, Two Pointers, Stack Medium
22 611 Valid Triangle Number LC Array, Two Pointers, Binary Search Medium
23 658 Find K Closest Elements LC Array, Two Pointers, Binary Search Medium
24 723 Candy Crush LC Array, Two Pointers, Matrix Medium
25 795 Number of Subarrays with Bounded Maximum LC Array, Two Pointers Medium
26 809 Expressive Words LC Array, Two Pointers, String Medium
27 825 Friends Of Appropriate Ages LC Array, Two Pointers, Binary Search Medium
28 826 Most Profit Assigning Work LC Array, Two Pointers, Binary Search Medium
29 845 Longest Mountain in Array LC Array, Two Pointers Medium
30 870 Advantage Shuffle LC Array, Two Pointers, Greedy Medium
31 881 Boats to Save People LC Array, Two Pointers, Greedy Medium
32 923 3Sum With Multiplicity LC Array, Hash Table, Two Pointers Medium
33 948 Bag of Tokens LC Array, Two Pointers, Greedy Medium
34 969 Pancake Sorting LC Array, Two Pointers, Greedy Medium
35 986 Interval List Intersections LC Array, Two Pointers Medium
36 1040 Moving Stones Until Consecutive II LC Array, Math, Two Pointers Medium
37 1048 Longest String Chain LC Array, Hash Table, Two Pointers Medium
38 1229 Meeting Scheduler LC Array, Two Pointers, Sorting Medium
39 1471 The k Strongest Values in an Array LC Array, Sorting Medium
40 1498 Subsequences Satisfying the Given Sum Condition LC Array, Two Pointers, Binary Search Medium
41 1508 Range Sum of Sorted Subarray Sums LC Array, Two Pointers, Binary Search Medium
42 1570 Dot Product of Two Sparse Vectors LC Array, Hash Table, Two Pointers Medium
43 1574 Shortest Subarray to be Removed to Make Array Sorted LC Array, Two Pointers, Binary Search Medium
44 1577 Square Equals Product of Two Numbers LC Array, Hash Table, Math Medium
45 1679 Max Number of K-Sum Pairs LC Array, Hash Table, Two Pointers Medium
46 1712 Ways to Split Array Into Three Subarrays LC Array, Two Pointers, Binary Search Medium
47 1813 Sentence Similarity III LC Array, Two Pointers, String Medium
48 1855 Max Distance Between a Pair of Values LC Array, Two Pointers, Binary Search Medium
49 1861 Rotating the Box LC Array, Two Pointers, Matrix Medium
50 1868 Product of Two Run-Length Encoded Arrays LC Array, Two Pointers Medium
51 1877 Minimize Maximum Pair Sum in Array LC Array, Two Pointers, Greedy Medium
52 2105 Watering Plants II LC Array, Two Pointers, Simulation Medium
53 2149 Rearrange Array Elements by Sign LC Array, Two Pointers, Simulation Medium
54 2161 Partition Array According to Given Pivot LC Array, Two Pointers, Simulation Medium
55 2300 Successful Pairs of Spells and Potions LC Array, Two Pointers, Binary Search Medium
56 2332 Latest Time to Catch a Bus LC Array, Two Pointers, Binary Search Medium
57 2406 Divide Intervals Into Min Number of Groups LC Array, Two Pointers, Greedy Medium
58 2410 Max Matching of Players With Trainers LC Array, Two Pointers, Greedy Medium
59 2422 Merge Operations to Turn Array Into Palindrome LC Array, Two Pointers, Greedy Medium
60 2462 Total Cost to Hire K Workers LC Array, Two Pointers Medium
61 2491 Divide Players Into Teams of Equal Skill LC Array, Hash Table, Two Pointers Medium
62 2563 Count the Number of Fair Pairs LC Array, Two Pointers, Binary Search Medium
63 2576 Max Number of Marked Indices LC Array, Two Pointers, Binary Search Medium
64 2592 Maximize Greatness of an Array LC Array, Two Pointers, Greedy Medium
📘 Array - Sliding Window , Binary Search, Hash Table
# No. Title LC Link Tags Level
1 209 Minimum Size Subarray Sum LC Array, Binary Search, Sliding Window Medium
2 487 Max Consecutive Ones II LC Array, DP, Sliding Window Medium
3 658 Find K Closest Elements LC Array, Two Pointers, Binary Search Medium
4 713 Subarray Product Less Than K LC Array, Sliding Window Medium
5 718 Maximum Length of Repeated Subarray LC Array, Binary Search Medium
6 904 Fruit Into Baskets LC Array, Hash Table, Sliding Window Medium
7 930 Binary Subarrays With Sum LC Array, Hash Table, Sliding Window Medium
8 978 Longest Turbulent Subarray LC Array, DP, Sliding Window Medium
9 1004 Max Consecutive Ones III LC Array, Binary Search, Sliding Window Medium
10 1031 Max Sum of Two Non-Overlapping Subarrays LC Array, DP, Sliding Window Medium
11 1052 Grumpy Bookstore Owner LC Array, Sliding Window Medium
12 1151 Min Swaps to Group All 1's Together LC Array, Sliding Window Medium
13 1248 Count Number of Nice Subarrays LC Array, Hash Table, Math Medium
14 1343 Subarrays of Size K with Avg ≥ Threshold LC Array, Sliding Window Medium
15 1423 Max Points You Can Obtain from Cards LC Array, Sliding Window, Prefix Sum Medium
16 1438 Longest Continuous Subarray Abs Diff ≤ Limit LC Array, Queue, Sliding Window Medium
17 1477 Two Non-overlapping Subarrays With Target Sum LC Array, Hash Table, Binary Search Medium
18 1493 Longest Subarray of 1's After Deleting One Element LC Array, DP, Sliding Window Medium
19 1658 Min Operations to Reduce X to Zero LC Array, Hash Table, Binary Search Medium
20 1695 Maximum Erasure Value LC Array, Hash Table, Sliding Window Medium
21 1696 Jump Game VI LC Array, DP, Queue Medium
22 1838 Frequency of the Most Frequent Element LC Array, Binary Search, Greedy Medium
23 1852 Distinct Numbers in Each Subarray LC Array, Hash Table, Sliding Window Medium
24 1918 Kth Smallest Subarray Sum LC Array, Binary Search, Sliding Window Medium
25 2090 K Radius Subarray Averages LC Array, Sliding Window Medium
26 2107 Unique Flavors After Sharing K Candies LC Array, Hash Table, Sliding Window Medium
27 2134 Minimum Swaps to Group All 1's Together II LC Array, Sliding Window Medium
28 2260 Minimum Consecutive Cards to Pick Up LC Array, Hash Table, Sliding Window Medium
29 2401 Longest Nice Subarray LC Array, Bit Manipulation, Sliding Window Medium
30 2411 Smallest Subarrays With Max Bitwise OR LC Array, Binary Search, Bit Manipulation Medium
31 2461 Maximum Sum of Distinct Subarrays of Length K LC Array, Hash Table, Sliding Window Medium
32 2537 Count the Number of Good Subarrays LC Array, Hash Table, Sliding Window Medium
33 2555 Maximize Win From Two Segments LC Array, Binary Search, Sliding Window Medium
34 2653 Sliding Subarray Beauty LC Array, Hash Table, Sliding Window Medium

Hard level ❤️❤️❤️❤️❤️

📚 Array - two pointer, Binary Search
  1. Trapping Rain Water-Array,Two Pointers,3+
  2. Find K-th Smallest Pair Distance-Array,Two Pointers,Binary Search,1+
  3. Get the Maximum Score-Array,Two Pointers,2+
  4. Closest Subsequence Sum,Array,Two Pointers,3+
  5. Maximum Score of a Good Subarray-Array,Two Pointers,Binary Search,2+
  6. Partition Array Into Two Arrays to Minimize Sum Difference-Array,Two Pointers,Binary Search,4+
  7. Maximum Total Beauty of the Gardens-Array,Two Pointers,Binary Search,2+
📚 Array - Sliding Window, Hash Tbale , Binary Search
  1. Contains Duplicate III-Array,Sliding Window,Sorting,2+
  2. Sliding Window Maximum-Array,Queue,Sliding Window,2+
  3. Sliding Window Median-Array,Hash Table,Sliding Window,1+
  4. Smallest Range Covering Elements from K Lists-Array,Hash Table,Greedy,3+
  5. K Empty Slots-Array,Binary Indexed Tree,2+
  6. Shortest Subarray with Sum at Least K-Array,Binary Search,Queue,4+
  7. Subarrays with K Different Integers-Array,Hash Table,Sliding Window,1+
  8. Minimum Number of K Consecutive Bit Flips-Array,Bit Manipulation,Queue,2+
  9. Constrained Subsequence Sum-Array,Dynamic Programming,Queue,3+
  10. Max Value of Equation-Array,Queue,Sliding Window,2+
  11. Maximum Number of Visible Points-Array,Math,Geometry,2+
  12. Minimum Adjacent Swaps for K Consecutive Ones-Array,Greedy,Sliding Window,1+
  13. Maximum Fruits Harvested After at Most K Steps-Array,Binary Search,Sliding Window,1+
  14. Count Subarrays With Score Less Than K-Array,Binary Search,Sliding Window,1+
  15. Maximum Number of Robots Within Budget-Array,Binary Search,Queue,3+
  16. Count Subarrays With Fixed Bounds-Array,Queue,Sliding Window,1+
  17. Maximum Frequency Score of a Subarray-Array,Hash Table,Math,1+
  18. Maximize the Minimum Powered City-Array,Binary Search,Greedy,3+

Trees and Graphs:

https://leetcode.com/problems/tree-of-coprimes/ https://leetcode.com/problems/redundant-connection-ii/ https://leetcode.com/problems/minimum-score-after-removals-on-a-tree/ https://leetcode.com/problems/minimize-malware-spread/ https://leetcode.com/problems/is-graph-bipartite/ https://leetcode.com/problems/jump-game-iii/ https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/ https://leetcode.com/problems/detonate-the-maximum-bombs/ https://leetcode.com/problems/cycle-length-queries-in-a-tree/ https://leetcode.com/problems/count-subtrees-with-max-distance-between-cities/ https://leetcode.com/problems/binary-trees-with-factors/ (with DP) https://leetcode.com/problems/find-eventual-safe-states/ https://leetcode.com/problems/open-the-lock/ https://leetcode.com/problems/surrounded-regions/ https://leetcode.com/problems/minimize-the-total-price-of-the-trips/ https://leetcode.com/problems/create-components-with-same-value/ https://leetcode.com/problems/minimum-cost-to-reach-destination-in-time/ (+DP) https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/ https://leetcode.com/problems/minimum-score-after-removals-on-a-tree/ https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups/ BFS / DFS ( Shortest Paths )

https://leetcode.com/problems/minimum-genetic-mutation/ https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/ https://leetcode.com/problems/shortest-path-in-binary-matrix/ https://leetcode.com/problems/maximum-number-of-points-from-grid-queries/ (with binary search) https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid/ https://leetcode.com/problems/number-of-restricted-paths-from-first-to-last-node/ (with DP) https://leetcode.com/problems/bus-routes/ Hashmaps

https://leetcode.com/problems/sum-of-matrix-after-queries/ https://leetcode.com/problems/determine-if-two-strings-are-close/ https://leetcode.com/problems/design-movie-rental-system/ Binary Trees

https://leetcode.com/problems/linked-list-in-binary-tree/ https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/ https://leetcode.com/problems/find-bottom-left-tree-value/ https://leetcode.com/problems/add-one-row-to-tree/ https://leetcode.com/problems/insufficient-nodes-in-root-to-leaf-paths/ https://leetcode.com/problems/path-in-zigzag-labelled-binary-tree/ https://leetcode.com/problems/binary-tree-coloring-game/ https://leetcode.com/problems/number-of-good-leaf-nodes-pairs/ Bitwise Operations :

leetcode.com/problems/neighboring-bitwise-xor/ https://leetcode.com/problems/longest-nice-subarray/ https://leetcode.com/problems/find-kth-largest-xor-coordinate-value/ https://leetcode.com/problems/number-of-steps-to-reduce-a-number-in-binary-representation-to-one/ https://leetcode.com/problems/minimum-operations-to-form-subsequence-with-target-sum/ Recursion :

https://leetcode.com/problems/find-the-punishment-number-of-an-integer/ https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests/ https://leetcode.com/problems/split-array-into-fibonacci-sequence/ https://leetcode.com/problems/numbers-with-same-consecutive-differences/ Sliding Window

https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k/ https://leetcode.com/problems/max-consecutive-ones-iii/ https://leetcode.com/problems/count-zero-request-servers/ https://leetcode.com/problems/continuous-subarrays/ https://leetcode.com/problems/maximize-the-confusion-of-an-exam/ https://leetcode.com/problems/length-of-the-longest-valid-substring/ Stack

https://leetcode.com/problems/number-of-visible-people-in-a-queue/ https://leetcode.com/problems/robot-collisions/ https://leetcode.com/problems/sum-of-subarray-minimums/ https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/ https://leetcode.com/problems/asteroid-collision/ https://leetcode.com/problems/largest-rectangle-in-histogram/ https://leetcode.com/problems/subarray-with-elements-greater-than-varying-threshold/ https://leetcode.com/problems/apply-operations-to-maximize-score/ https://leetcode.com/problems/beautiful-towers-ii/ Dynamic Programming

https://leetcode.com/problems/count-vowels-permutation/ (A medium level problem) https://leetcode.com/problems/russian-doll-envelopes/ https://leetcode.com/problems/maximum-alternating-subsequence-sum/ https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray/ https://leetcode.com/problems/longest-arithmetic-subsequence/ https://leetcode.com/problems/tallest-billboard/ https://leetcode.com/problems/decremental-string-concatenation/ https://leetcode.com/problems/count-all-possible-routes/ https://leetcode.com/problems/sum-of-imbalance-numbers-of-all-subarrays/ https://leetcode.com/problems/knight-dialer/ https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference/ https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended-ii/ https://leetcode.com/problems/number-of-longest-increasing-subsequence/ https://leetcode.com/problems/minimum-sideway-jumps/ https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/ https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule/ https://leetcode.com/problems/student-attendance-record-ii/ Linked Lists

https://leetcode.com/problems/merge-in-between-linked-lists/ https://leetcode.com/problems/remove-nodes-from-linked-list/ https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/ https://leetcode.com/problems/split-linked-list-in-parts/ https://leetcode.com/problems/reverse-linked-list-ii/ Bitmasking DP

https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/ https://leetcode.com/problems/maximize-score-after-n-operations/ https://leetcode.com/problems/special-permutations/ https://leetcode.com/problems/minimum-number-of-work-sessions-to-finish-the-tasks/ https://leetcode.com/problems/find-longest-awesome-substring/ https://leetcode.com/problems/number-of-valid-words-for-each-puzzle/ (No DP) https://leetcode.com/problems/number-of-ways-to-wear-different-hats-to-each-other/ https://leetcode.com/problems/the-number-of-good-subsets/ Suffix and Prefix Array :

https://leetcode.com/problems/find-two-non-overlapping-sub-arrays-each-with-target-sum/ (Hashmaps) https://leetcode.com/problems/minimum-deletions-to-make-string-balanced/ https://leetcode.com/problems/minimum-cost-to-make-array-equal/ (with binary search) https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element/ https://leetcode.com/problems/minimum-index-of-a-valid-split/ https://leetcode.com/problems/grid-game/ https://leetcode.com/problems/max-chunks-to-make-sorted-ii/ https://leetcode.com/problems/maximum-fruits-harvested-after-at-most-k-steps/ https://leetcode.com/problems/minimum-penalty-for-a-shop/ https://leetcode.com/problems/132-pattern (with sets) DSU :

https://leetcode.com/problems/accounts-merge/ https://leetcode.com/problems/satisfiability-of-equality-equations/ https://leetcode.com/problems/process-restricted-friend-requests/ https://leetcode.com/problems/graph-connectivity-with-threshold/ https://leetcode.com/problems/making-a-large-island/ Binary Search :

https://leetcode.com/problems/snapshot-array/ https://leetcode.com/problems/range-frequency-queries/ https://leetcode.com/problems/maximum-number-of-removable-characters/ leetcode.com/problems/split-array-largest-sum/ https://leetcode.com/problems/maximize-the-confusion-of-an-exam/ https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/ https://leetcode.com/problems/find-k-th-smallest-pair-distance/ https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/ https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag/ Digit DP

https://leetcode.com/problems/count-of-integers/ https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/ https://leetcode.com/problems/count-stepping-numbers-in-range/ https://leetcode.com/problems/count-special-integers/ Sorting :

https://leetcode.com/problems/movement-of-robots/ (prefix sums) https://leetcode.com/problems/put-marbles-in-bags/ https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/ https://leetcode.com/problems/minimum-interval-to-include-each-query/ https://leetcode.com/problems/non-overlapping-intervals/ https://leetcode.com/problems/k-th-smallest-prime-fraction/ https://leetcode.com/problems/closest-room/ (binary search) String

https://leetcode.com/problems/lexicographically-smallest-string-after-substring-operation/ https://leetcode.com/problems/sum-of-scores-of-built-strings/ (hashing) https://leetcode.com/problems/maximum-repeating-substring/ https://leetcode.com/problems/longest-chunked-palindrome-decomposition/ https://leetcode.com/problems/shortest-palindrome/ https://leetcode.com/problems/maximum-deletions-on-a-string/ https://leetcode.com/problems/longest-duplicate-substring/ Counting

https://leetcode.com/problems/count-unique-characters-of-all-substrings-of-a-given-string/ https://leetcode.com/problems/sum-of-all-odd-length-subarrays/ https://leetcode.com/problems/count-anagrams/ Line Sweep

https://leetcode.com/problems/describe-the-painting/ https://leetcode.com/problems/my-calendar-iii/ https://leetcode.com/problems/number-of-flowers-in-full-bloom/ https://leetcode.com/problems/maximum-beauty-of-an-array-after-applying-operation/ https://leetcode.com/problems/divide-intervals-into-minimum-number-of-groups/ Re-rooting

https://leetcode.com/problems/count-number-of-possible-root-nodes/ https://leetcode.com/problems/difference-between-maximum-and-minimum-price-sum/ https://leetcode.com/problems/minimum-height-trees/ Trie

https://leetcode.com/problems/sum-of-prefix-scores-of-strings/ https://leetcode.com/problems/maximum-genetic-difference-query/ (Tree Query) https://leetcode.com/problems/prefix-and-suffix-search/

✅ Best Practices:

  • Keep filenames clean (solution.cpp, solution.py)
  • Add comments where necessary
  • Group problems by topics (optional but encouraged)

🤝 Contributing

Want to help expand this repository?

  1. Fork it 🍴
  2. Create your feature branch (git checkout -b new-solution)
  3. Commit your changes (git commit -m 'Added XYZ problem')
  4. Push to the branch (git push origin new-solution)
  5. Open a PR 🚀

🌟 Support & Recognition

If this project helps you:

  • Star the repo
  • 🔁 Share it with peers preparing for coding interviews
  • 🧠 Keep coding and contribute back!

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


👤 About

Made with ☕ and code by Anamicca23

Let’s crack those coding interviews one problem at a time!


About

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published