Python environment for LeetCode practice.
1. Install mise
mise run setupEdit main.py and run:
mise run pmise run svEnter the problem slug (e.g. 1.two-sum) when prompted. This will:
- Save to
_result/{problem}/main.py - Save as
main_2.py,main_3.py, etc. if the problem was solved before - Commit automatically with git
- Reset
main.pyto the template
.
├── main.py # Working file
├── .mise.toml # Dev tool config (mise)
├── .pre-commit-config.yaml # Pre-commit hooks
├── shell/
│ └── solve.sh # Save script
├── _template/ # Template files
└── _result/ # Saved answers
└── {problem}/
└── main.py