Daily solutions to LeetCode's Top Interview 150 problems in C++ and Python
This repository contains my solutions to the LeetCode Top Interview 150 problems. The Top Interview 150 is a curated list of essential coding problems that cover the most common topics asked in technical interviews at top tech companies.
Goal: Solve all 150 problems and build a comprehensive reference for interview preparation.
- Total Problems: 150
- Solved: 16
- In Progress: 134
- Last Updated: January 26, 2026
.
├── README.md
├── problem_name.cpp # C++ solution
└── problem_name.py # Python solution
Each problem includes clean code in both C++ and Python
The Top Interview 150 covers these key topics:
- Array / String
- Two Pointers
- Sliding Window
- Matrix
- Hashmap
- Intervals
- Stack
- Linked List
- Binary Tree General
- Binary Tree BFS
- Binary Search Tree
- Graph General
- Graph BFS
- Trie
- Backtracking
- Divide & Conquer
- Kadane's Algorithm
- Binary Search
- Heap
- Bit Manipulation
- Math
- 1D DP
- Multidimensional DP
| # | Problem | Difficulty | C++ | Python | Topics |
|---|---|---|---|---|---|
| 26 | Remove Duplicates from Sorted Array | Easy | ✓ | ✓ | Array, Two Pointers |
| 27 | Remove Element | Easy | ✓ | ✓ | Array, Two Pointers |
| 42 | Trapping Rain Water | Hard | ✓ | ✓ | Array, Two Pointers, Dynamic Programming, Stack |
| 45 | Jump Game II | Medium | ✓ | ✓ | Array, Greedy, Dynamic Programming |
| 55 | Jump Game | Medium | ✓ | ✓ | Array, Greedy, Dynamic Programming |
| 80 | Remove Duplicates from Sorted Array II | Medium | ✓ | ✓ | Array, Two Pointers |
| 88 | Merge Sorted Array | Easy | ✓ | ✓ | Array, Two Pointers |
| 121 | Best Time to Buy and Sell Stock | Easy | ✓ | ✓ | Array, Dynamic Programming |
| 122 | Best Time to Buy and Sell Stock II | Medium | ✓ | ✓ | Array, Greedy, Dynamic Programming |
| 134 | Gas Station | Medium | ✓ | ✓ | Array, Greedy |
| 135 | Candy | Hard | ✓ | ✓ | Array, Greedy |
| 169 | Majority Element | Easy | ✓ | ✓ | Array, Hash Table, Divide and Conquer |
| 189 | Rotate Array | Medium | ✓ | ✓ | Array, Math, Two Pointers |
| 238 | Product of Array Except Self | Medium | ✓ | ✓ | Array, Prefix Sum |
| 274 | H-Index | Medium | ✓ | ✓ | Array, Sorting, Counting Sort |
| 380 | Insert Delete GetRandom O(1) | Medium | ✓ | ✓ | Array, Hash Table, Design |
- C++: Modern C++ (C++17/20) with STL
- Python: Python 3.x with clear, pythonic solutions
If you find this repository helpful, consider giving it a ⭐!
This project is open source and available under the MIT License.
Happy Coding! 💻✨