This repository contains my solutions to various LeetCode problems, organized by difficulty level. Each solution is implemented in Go and includes detailed explanations where applicable.
leetcode/
├── easy/
│ ├── two-sum/
│ ├── palindrome-number/
│ └── ...
├── medium/
│ ├── longest-palindromic-substring/
│ ├── longest-substring-without-repeating/
│ └── ...
└── hard/
└── ...
- Two Sum
- Palindrome Number
- Roman to Integer
- Longest Common Prefix
- Valid Parentheses
- Remove Duplicates from Sorted Array
(Coming soon)
- Fork the repository
- Create a new branch for your solution:
git checkout -b problem-name
- Add your solution following this structure:
difficulty-level/ └── problem-name/ ├── main.go # Solution implementation └── README.md # Problem description and explanation (optional)
- Ensure your code:
- Passes all LeetCode test cases
- Includes comments explaining the approach
- Follows Go best practices and conventions
- Create a Pull Request with:
- Clear description of the problem and solution
- LeetCode problem link
- Time and space complexity analysis
When adding a new solution, please update the README.md file following these steps:
-
Add your solution to the appropriate section under "Current Solutions"
### [Difficulty Level] - [Problem Name](difficulty-level/problem-name)
-
Ensure the link follows the correct folder structure
- Example:
[Two Sum](easy/two-sum)
- Example:
-
Keep solutions sorted:
- Within each difficulty section, maintain alphabetical order
- If adding a new difficulty section, follow the order: Easy → Medium → Hard
-
If adding the first solution to a difficulty level:
- Replace "(Coming soon)" with your solution
- Ensure proper heading structure (###)
Example addition:
### Easy
- [Existing Solution](easy/existing-solution)
- [New Solution](easy/new-solution) <!-- Add your solution here -->
Each solution can be tested directly on LeetCode's platform. Local tests can be added in the future.
Feel free to reach out if you have any questions or suggestions!
⭐ Star this repository if you find it helpful!