Skip to main content
leetcode-py: Modern Python LeetCode practice environment. leetcode-py: Modern Python LeetCode practice environment.
testscodecovpypipython versions

Why leetcode-py?

  • Tests come with the problem: every generated problem ships a parametrized pytest suite with 10+ cases. You never write test scaffolding; you only make red go green.
  • Data structures you can see: TreeNode, ListNode, and GraphNode convert between LeetCode’s array format and live objects, and render as diagrams in Jupyter or clean ASCII in the terminal.
  • 300+ problems ready to generate: Grind 75, Blind 75, NeetCode 150, NeetCode 250, and Algo Master 75 as reproducible JSON templates.
See the full pitch in Why leetcode-py.

A taste

Installation

Install the CLI from PyPI, or clone the repo for development.

Quickstart

Generate your first problem, run its tests, and solve it.