A personal collection of LeetCode problem solutions with clear problem statements, well-tested code, and detailed design documentation.
Each problem lives in its own folder and contains everything needed to understand, run, and review the solution.
leet-code/
├── README.md # This file
├── 1 Two Sum/
│ ├── README.md # Problem description, constraints, examples
│ ├── src # Solution code with tests (or .js / .java / etc.)
│ └── design-doc.md # Approach, complexity, alternatives, trade-offs
└── ...
| File | Purpose |
|---|---|
README.md |
Official problem statement, examples, constraints, and link to LeetCode |
src |
Clean, production-quality implementation with unit tests |
design-doc.md |
Solution explanation, time/space complexity, why this approach was chosen, alternatives considered, and any interview notes |
- Clarity – Every solution is explained thoroughly so it can be revisited months later.
- Correctness – Solutions are backed by automated tests.
- Interview readiness – Design docs capture the reasoning and trade-offs you would discuss in an interview.
- Consistency – Uniform structure across all problems makes navigation easy.
- Browse by problem number or title.
- Read the problem
README.mdfirst. - Review the
design-doc.mdfor the thought process. - Look at the code and run the tests if desired.
This repository is for personal learning and interview preparation.
Feel free to use the code and explanations for your own study.
Happy solving! 🚀