This repository contains carefully selected interesting and valuable LeetCode problems and their solutions implemented in C++. It focuses on problems that teach important algorithmic concepts and are frequently asked in technical interviews.
| # | Problem | Difficulty | Topic |
|---|---|---|---|
| 1 | Longest Common Subsequence | Medium | Dynamic Programming |
| 2 | Minimum Element After Digit Sum Replacement | Medium | Simulation |
| 3 | Basic Calculator | Hard | Stack, String Parsing |
| 4 | Excel Sheet Column Number | Easy | Math |
| 5 | Find Duplicate Number | Medium | Array, Two Pointers |
| 6 | Longest Palindrome Substring | Medium | String, Dynamic Programming |
| 7 | Permutation in String | Medium | Sliding Window |
| 8 | Permutations | Medium | Backtracking |
| 9 | Remove All Adjacent Duplicates in String | Easy | Stack |
| 10 | Search Insert Position | Easy | Binary Search |
| 11 | Spiral Matrix | Medium | Matrix, Simulation |
| 12 | String Compression | Medium | String, Two Pointers |
| 13 | Super Power | Medium | Math, Modular Arithmetic |
| 14 | Walking Robot | Medium | Simulation, Set |
| 15 | Walking Robot II | Hard | Simulation, Complex Logic |
- Dynamic Programming: Longest Common Subsequence, Longest Palindrome Substring
- Backtracking: Permutations
- Sliding Window: Permutation in String
- Stack: Basic Calculator, Remove Adjacent Duplicates
- Binary Search: Search Insert Position
- Array Techniques: Find Duplicate, Spiral Matrix
- String Processing: String Compression, Excel Sheet Column
- Simulation: Walking Robot, Walking Robot II
- Math: Super Power, Modular Arithmetic
-
Clone the repository:
git clone https://github.com/Myparadox-creator/C-_leetcode.git
-
Browse through the problems by difficulty level or topic.
-
Check individual files for:
- Well-documented C++ solutions
- Algorithm explanations
- Time and space complexity analysis
- Edge cases handled
- ✅ Quality Over Quantity: Only the most valuable and insightful problems
- 🎓 Interview Ready: Problems frequently asked in technical interviews
- 📖 Learning Resource: Each solution demonstrates important algorithmic patterns
- 🔍 Well-Organized: Problems categorized by difficulty and topic
- 💻 Production-Grade Code: Well-structured and commented solutions
Contributions are welcome! You can:
- Suggest optimizations for existing solutions
- Add more valuable problems and solutions
- Improve explanations or documentation
- Fix bugs or edge cases
This repository is under the MIT License.
Happy coding! 🚀
| 0022-generate-parentheses |
| 0038-count-and-say |
| 0049-group-anagrams |
| 0389-find-the-difference |
| 0392-is-subsequence |
| 0504-base-7 |
| 1021-remove-outermost-parentheses |
| 1524-number-of-sub-arrays-with-odd-sum |
| 1621-number-of-sets-of-k-non-overlapping-line-segments |
| 1658-minimum-operations-to-reduce-x-to-zero |
| 3903-smallest-stable-index-i |
| 0593-valid-square |
| 0836-rectangle-overlap |
| 0509-fibonacci-number |
| 0509-fibonacci-number |
| 0202-happy-number |
| 0392-is-subsequence |
| 0475-heaters |
| 1385-find-the-distance-value-between-two-arrays |
| 0202-happy-number |
| 0400-nth-digit |
| 0475-heaters |
| 1385-find-the-distance-value-between-two-arrays |
| 1658-minimum-operations-to-reduce-x-to-zero |
| 1658-minimum-operations-to-reduce-x-to-zero |
| 0089-gray-code |
| 0389-find-the-difference |
| 0062-unique-paths |
| 1621-number-of-sets-of-k-non-overlapping-line-segments |
| 1021-remove-outermost-parentheses |
| 0022-generate-parentheses |
| 1021-remove-outermost-parentheses |
| 2778-sum-of-squares-of-special-elements |
| 0036-valid-sudoku |
| 0064-minimum-path-sum |
| 1254-number-of-closed-islands |
| 3727-maximum-alternating-sum-of-squares |
| 3789-minimum-cost-to-acquire-required-items |
| 2913-subarrays-distinct-element-sum-of-squares-i |
| 2916-subarrays-distinct-element-sum-of-squares-ii |
| 2913-subarrays-distinct-element-sum-of-squares-i |
| 2916-subarrays-distinct-element-sum-of-squares-ii |
| 0229-majority-element-ii |
| 0229-majority-element-ii |
| 0022-generate-parentheses |
| 0089-gray-code |
| 1254-number-of-closed-islands |
| 1254-number-of-closed-islands |
| 1254-number-of-closed-islands |