Premium LeetCode practice environment with modern Python tooling, beautiful tree visualizations, and comprehensive testing.
- Template-driven development - Consistent structure for every problem
- Beautiful visualizations - TreeNode with anytree/Graphviz, ListNode with arrows
- Interactive notebooks - Multi-cell playground for each problem
- One-command testing -
make p-test PROBLEM=problem_name - Bulk regeneration -
make gen-all-problemsfrom JSON templates - Full linting - black, isort, ruff, mypy with nbqa for notebooks
- Modern Python - PEP 585/604 syntax with full type hints
# Run existing problems
make p-test PROBLEM=insert_interval
make p-test PROBLEM=invert_binary_tree
# Run all tests
make testAdding new problems:
- Copy problem and placeholder solution from LeetCode
- Ask LLM to generate them
- LLM follows workflow in
.amazonq/rules/problem-creation.mdusing cookiecutter templates
make p-test PROBLEM=insert_interval # Test specific problem
make test # Run all tests
make lint # Code quality checks
make p-gen PROBLEM=new_prob # Generate new problemπ΄ Fork Setup:
make gen-all-problems # Regenerate all problems from JSON templates- TreeNode:
from leetcode_py.tree_node import TreeNode- Beautiful tree visualization with anytree rendering
- Jupyter notebook support with Graphviz diagrams
- Easy array β tree conversion for testing
- ListNode:
from leetcode_py.list_node import ListNode- Clean arrow visualization (
1 -> 2 -> 3) - Simple array β list conversion
- Perfect for debugging linked list problems
- Clean arrow visualization (
- New helpers: Add to
leetcode_py/
Perfect for interview preparation with professional-grade tooling and beautiful visualizations.