|
| 1 | +# LeetCode Practice Repository 🚀 |
| 2 | + |
| 3 | +[](https://sonarcloud.io/summary/new_code?id=wisarootl_leetcode-py) |
| 4 | +[](https://sonarcloud.io/summary/new_code?id=wisarootl_leetcode-py) |
| 5 | +[](https://sonarcloud.io/summary/new_code?id=wisarootl_leetcode-py) |
| 6 | +[](https://codecov.io/gh/wisarootl/leetcode-py) |
| 7 | +[](https://github.com/wisarootl/zerv/actions/workflows/ci-test.yml) |
| 8 | +[](https://github.com/wisarootl/zerv/actions/workflows/cd.yml) |
| 9 | + |
| 10 | +Premium LeetCode practice environment with modern Python tooling, beautiful tree visualizations, and comprehensive testing. |
| 11 | + |
| 12 | +## ✨ Features |
| 13 | + |
| 14 | +- **Template-driven development** - Consistent structure for every problem |
| 15 | +- **Beautiful tree visualizations** - Pretty-printed binary trees with anytree |
| 16 | +- **Rich test logging** - `@logged_test` decorator with detailed tracebacks |
| 17 | +- **One-command testing** - `make test-question QUESTION=problem_name` |
| 18 | +- **Code quality** - black, isort, ruff, mypy integration |
| 19 | +- **Modern Python** - PEP 585/604 syntax with full type hints |
| 20 | + |
| 21 | +## 🚀 Quick Start |
| 22 | + |
| 23 | +```bash |
| 24 | +# Run existing problems |
| 25 | +make test-question QUESTION=two_sum |
| 26 | +make test-question QUESTION=invert_binary_tree |
| 27 | + |
| 28 | +# Run all tests |
| 29 | +make test |
| 30 | +``` |
| 31 | + |
| 32 | +**Adding new problems**: Use an LLM agent (rules in `.amazonq/rules/development-rules.md`) to automatically create new problems from copied LeetCode problem text using the template structure. |
| 33 | + |
| 34 | +## 🧰 Commands |
| 35 | + |
| 36 | +```bash |
| 37 | +make test-question QUESTION=two_sum # Test specific problem |
| 38 | +make test # Run all tests |
| 39 | +make lint # Code quality checks |
| 40 | +``` |
| 41 | + |
| 42 | +## 🎨 Example Output |
| 43 | + |
| 44 | +``` |
| 45 | +# TreeNode visualization |
| 46 | +4 |
| 47 | +├── 2 |
| 48 | +│ ├── 1 |
| 49 | +│ └── 3 |
| 50 | +└── 7 |
| 51 | + ├── 6 |
| 52 | + └── 9 |
| 53 | +
|
| 54 | +# Test logging |
| 55 | +2024-01-01 10:00:00 | SUCCESS | Got result: [4,7,2,9,6,3,1] |
| 56 | +2024-01-01 10:00:00 | DEBUG | Test passed! ✨ |
| 57 | +``` |
| 58 | + |
| 59 | +Perfect for interview preparation with professional-grade tooling and beautiful visualizations. |
0 commit comments