Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vhlima1008/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Daily Practice

Daily LeetCode solutions focused on consistency, readability, and long-term reference.

Language License Last commit Stars


Table of Contents


Overview

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.


Repository Structure

Current structure:

.
├── Python/
│   ├── 3433_Count_Mentions_Per_User.py
│   ├── 3531_Count_Covered_Buildings.py
│   └── ...
└── README.md

Naming conventions

  • All solutions have a language, like: Python/
  • Filenames: aligned with the LeetCode problem name
  • Prefer readable names over cryptic abbreviations

Tech Stack

  • Python 3
  • LeetCode
  • Git

Links:


Setup

Prerequisites

  • Python 3 installed

Optional dependencies

If you add a requirements.txt in the future:

pip install -r requirements.txt

How to Run a Solution

If 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"

Style Guide

To keep solutions consistent and easy to review, I follow these rules:

  1. Header comment

    • Problem name
    • Approach summary (1–3 lines)
    • Time/space complexity
  2. Readable first

    • Prefer clarity over clever one-liners
    • Use descriptive variable names
  3. Complexity

    • Add Time: and Space: notes when non-trivial
  4. Minimal but helpful docs

    • A short explanation is better than none
    • Add edge-case notes if relevant

Suggested solution template

"""
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
    pass

Contributing

Contributions are welcome—especially improvements to clarity, correctness, edge cases, or additional approaches.

  1. Fork this repository and clone it locally

  2. Create a new branch:

    git checkout -b my-branch
  3. Commit your changes:

    git add .
    git commit -m "feat: 67_Add_Binary.py"
  4. Push to your fork:

    git push origin my-branch
  5. Open a Pull Request


License

This project is licensed under the MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages