Link:https://leetcode.com/studyplan/leetcode-75/
A curated repository containing solutions to all 75 LeetCode problems from the LeetCode 75 challenge, implemented in Java with detailed explanations. Perfect for learning, revision, and interview preparation.
LeetCode-75/
│
├── README.md # This file
├── .gitignore # Ignore .class and other unnecessary files
├── 01_TwoPointers/ # Problems solved using Two Pointers pattern
│ ├── 001_TwoSum.java
│ ├── 002_ValidPalindrome.java
│ └── ...
├── 02_String/ # Problems solved using String manipulation
│ ├── 1768_MergeStringsAlternately.java
│ └── ...
├── 03_DynamicProgramming/ # DP problems
│ └── ...
└── ... # Other categories/patterns
- Clone the repository:
git clone https://github.com/SyedUzaiir/LeetCode-75.git
- Compile & run a solution:
cd 02_String
javac MergeStringsAlternately.java
java MergeStringsAlternately
-
Add new solutions:
- Follow the same folder structure based on the problem’s pattern.
- Include detailed comments with approach, complexity, and examples.
- Avoid pushing
.class
files (use.gitignore
).
- Well-structured folder organization by patterns/topics.
- GitHub-ready Java files with
main
methods for testing. - Detailed in-line comments for problem explanation, approach, and complexity.
- Easy to use for revision or interview prep.
-
File Naming:
[ProblemNumber]_[ProblemName].java
-
Class Naming: PascalCase matching the file name.
-
Comments: Each file contains:
- Problem statement
- Approach / Idea
- Complexity Analysis
- Test cases in
main
Feel free to fork this repository and add solutions in the same format.
- Use descriptive commit messages like:
"Add solution for Merge Strings Alternately (1768)"
- Keep
.class
files excluded via.gitignore
.
This repository is open-source under the MIT License.