Daily LeetCode solutions focused on consistency, readability, and long-term reference.
- Overview
- Repository Structure
- Tech Stack
- Setup
- How to Run a Solution
- Style Guide
- Optional: Organize by Topic (without breaking the streak)
- Contributing
- License
This repository tracks my daily LeetCode practice.
Each day, I add at least one solution inside Python/, using clear filenames that match the original problem title. The goals are:
- Consistency: keep a daily practice streak
- Readability: clean code and naming
- Revisitability: quick to understand later (notes + complexity when useful)
Use this repo as a study log, a reference library, or a source of alternative approaches.
Current structure:
.
├── Python/
│ ├── 3433_Count_Mentions_Per_User.py
│ ├── 3531_Count_Covered_Buildings.py
│ └── ...
└── README.mdNaming conventions
- All solutions have a language, like:
Python/ - Filenames: aligned with the LeetCode problem name
- Prefer readable names over cryptic abbreviations
- Python 3
- LeetCode
- Git
Links:
- Python Docs: https://docs.python.org/3/
- LeetCode: https://leetcode.com/
- Git: https://git-scm.com/
- Python 3 installed
If you add a requirements.txt in the future:
pip install -r requirements.txtIf a file contains a runnable block like:
if __name__ == "__main__":
...Run it with:
python "Python/<file-name>.py"Example:
python "Python/9_Palindrome_Number.py"To keep solutions consistent and easy to review, I follow these rules:
-
Header comment
- Problem name
- Approach summary (1–3 lines)
- Time/space complexity
-
Readable first
- Prefer clarity over clever one-liners
- Use descriptive variable names
-
Complexity
- Add
Time:andSpace:notes when non-trivial
- Add
-
Minimal but helpful docs
- A short explanation is better than none
- Add edge-case notes if relevant
"""
LeetCode: <Problem Name>
Approach: <brief description>
Time: O(...)
Space: O(...)
"""
from typing import List
class Solution:
def solve(self, ...):
...
if __name__ == "__main__":
# Optional quick sanity checks
passContributions are welcome—especially improvements to clarity, correctness, edge cases, or additional approaches.
-
Fork this repository and clone it locally
-
Create a new branch:
git checkout -b my-branch
-
Commit your changes:
git add . git commit -m "feat: 67_Add_Binary.py"
-
Push to your fork:
git push origin my-branch
-
Open a Pull Request
This project is licensed under the MIT License. See LICENSE.