A collection of my solutions to LeetCode problems, written in C++, focused on mastering Data Structures and Algorithms for placement preparation.
This repository contains:
- My personal solutions to LeetCode problems
- Categorization by topic and difficulty
- Well-commented C++ code
- Notes and thought process for tricky problems
LeetCode-DSA-Cpp/
│
├── Arrays/
│ ├── TwoSum.cpp
│ ├── MaximumSubarray.cpp
│
├── Strings/
│ ├── LongestSubstring.cpp
│
├── LinkedList/
│ ├── ReverseLinkedList.cpp
│
├── DynamicProgramming/
│ ├── LongestIncreasingSubsequence.cpp
│
└── README.md
1. Clone the repository
git clone https://github.com/your-username/LeetCode-DSA-Cpp.git
cd LeetCode-DSA-Cpp
2. Compile and run a solution
g++ Arrays/TwoSum.cpp -o TwoSum
./TwoSum
- Arrays
- Strings
- Linked List
- Stacks & Queues
- Trees & Graphs
- Recursion & Backtracking
- Dynamic Programming
- Greedy Algorithms
- Binary Search
- Hashing
- Strengthen problem-solving skills
- Prepare for SDE interviews & placements
- Build a reusable DSA notes + solutions bank
Here’s a list of must-do problems for placements:
- Arrays: Two Sum, Maximum Subarray, Merge Intervals
- Strings: Longest Substring Without Repeating Characters, Anagram Check
- Linked List: Reverse Linked List, Detect Cycle
- Trees: Binary Tree Level Order Traversal, Lowest Common Ancestor
- Dynamic Programming: Longest Increasing Subsequence, Coin Change
- Graphs: Number of Islands, Detect Cycle in Graph
This repository is licensed under the MIT License — you’re free to use, modify, and share the code with attribution.
If you have optimized solutions, feel free to fork this repo and create a pull request.