Skip to main content

a library with frequently updated LeetCode solutions created by the community

Project description

kzleet

kzleet is a library with frequently updated LeetCode solutions created by the community (mostly me).

PyPI Downloads PyPI version

Author: Kevin Zhu, with code that may be from others (credit given).

This is a library with solutions of LeetCode everyday that is updated as quickly as possible. If I am unable to create a solution, it may not be there.

If you have a solution or would like to contribute a different one email me at kzhu2099@gmail.com. If I use yours, I will make sure to give credit!!

It has been stopped as of August 1, 2025, but may continue in the future.

Note: dates follow the UTC date as does LeetCode. Important: please visit the disclaimer below.

Features

  • a (hopefully) long list of (hopefully) unique LeetCode Solutions
  • ability to contribute

Installation

To install kzleet, use pip: pip install kzleet.

However, many prefer to use a virtual environment.

macOS / Linux:

# make your desired directory
mkdir /path/to/your/directory
cd /path/to/your/directory

# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv

# install kzleet
source .venv/bin/activate
pip install kzleet

deactivate # when you are completely done

Windows CMD:

# make your desired directory
mkdir C:path\to\your\directory
cd C:path\to\your\directory

# setup the .venv (or whatever you want to name it)
pip install virtualenv
python3 -m venv .venv

# install kzleet
.venv\Scripts\activate
pip install kzleet

deactivate # when you are completely done

Usage

You may look at the problems by importing like so:

from kzleet import Solution_#### where #### is the problem number of the problem. They are also sorted by the LeetCode given difficulty in different files.

There may be multiple implementations: just add a letter after (_A, _B) for different ones.

Then, to see the code, simply run print(Solution_####()).

This works for both classes and functions, allowing you to see the full solution.

For solutions that have multiple steps, there may be an internal comment (visible within the print) with those extra helper functions.

License

The License is an MIT License found in the LICENSE file.

Disclaimer

This library provides personal / community solutions from LeetCode. They are not the Editorial solutions that you find there, and are in no means as good as theirs. This is for educational purposes to provide a different perspective on problems. also, I will try my best to answer all problems. If I can't, I may ask AI (due to not having time) or it having a significantly improved solution. I will always write if it uses AI.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kzleet-2025.8.7.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kzleet-2025.8.7.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file kzleet-2025.8.7.0.tar.gz.

File metadata

  • Download URL: kzleet-2025.8.7.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for kzleet-2025.8.7.0.tar.gz
Algorithm Hash digest
SHA256 04382cb5686845bd64b7595e30e6bf2dc3d232fc2e7f5eb9fb6a2ff9500b2990
MD5 4975831d7dae596d2d137530854586f4
BLAKE2b-256 f44ac6ada7ea57a1c37a2e5b0594ca7d25e7704620db51580c1f340b4c3aab0f

See more details on using hashes here.

File details

Details for the file kzleet-2025.8.7.0-py3-none-any.whl.

File metadata

  • Download URL: kzleet-2025.8.7.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for kzleet-2025.8.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97f5b8bb41aeab873c9634a5f858210451338758debb475642e854da97659417
MD5 74a37be70b46468e65065a0f1cd20cdb
BLAKE2b-256 77c8ae14a95a2fd5a1f4e70d33af1ac7e608f93698227325b5b31aff9b47483d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page