Skip to content

A multi-language LeetCode workspace for offline development and testing.

Notifications You must be signed in to change notification settings

visigoth/leetcode-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-env

A multi-language LeetCode workspace for offline development and testing, currently supporting C++, Python, and Rust.

Requirements

  • macOS (uses Homebrew for dependencies)
  • Homebrew
  • just - task runner (brew install just)
  • pyenv with virtualenv support (brew install pyenv pyenv-virtualenv)
  • direnv (optional, for automatic environment activation) (brew install direnv)
  • Claude Code (optional, for auto-generating tests)

Language-specific dependencies are installed automatically during setup:

  • C++: cmake, GoogleTest
  • Python: pytest
  • Rust: cargo (via rustup)

Quickstart

  1. Clone the repository and install the task runner:
git clone <repo-url> leetcode
cd leetcode
brew install just
  1. Run setup for your preferred language(s):
just setup cpp           # C++ only
just setup py            # Python only
just setup cpp py rs     # All languages

The setup will prompt you to select a default language for just start.

  1. Start working on a problem:
just start 1             # Fetch problem #1 (Two Sum) in your default language
just start 1 -l cpp,py   # Fetch for multiple languages
  1. Run tests:
just test                # Run all tests
just test 1              # Run tests for problem #1 only

You can also run tests from within a language directory (cpp/, py/, rs/) for language-specific commands.

About

A multi-language LeetCode workspace for offline development and testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published