Skip to content

Python LeetCode practice environment with automated problem generation, data structure visualizations, and comprehensive testing. Includes all Grind 75, partial Blind, Neetcode and Algomaster problems with enhanced TreeNode/ListNode helpers, CI/CD pipeline, and LLM-assisted problem creation.

License

Notifications You must be signed in to change notification settings

wislertt/leetcode-py

Repository files navigation

LeetCode Practice Repository πŸš€

Quality Gate Status Security Rating Vulnerabilities codecov tests release

Premium LeetCode practice environment with modern Python tooling, beautiful tree visualizations, and comprehensive testing.

✨ Features

  • Template-driven development - Consistent structure for every problem
  • Beautiful tree visualizations - Pretty-printed binary trees with anytree
  • Rich test logging - @logged_test decorator with detailed tracebacks
  • One-command testing - make test-question QUESTION=problem_name
  • Code quality - black, isort, ruff, mypy integration
  • Modern Python - PEP 585/604 syntax with full type hints

πŸš€ Quick Start

# Run existing problems
make q-test QUESTION=two_sum
make q-test QUESTION=invert_binary_tree

# Run all tests
make test

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.

🧰 Commands

make q-test QUESTION=two_sum  # Test specific problem
make test                     # Run all tests
make lint                     # Code quality checks
make q-gen QUESTION=new_prob  # Generate new problem

🎨 Example Output

# TreeNode visualization
4
β”œβ”€β”€ 2
β”‚   β”œβ”€β”€ 1
β”‚   └── 3
└── 7
    β”œβ”€β”€ 6
    └── 9

# Test logging
2024-01-01 10:00:00 | SUCCESS | Got result: [4,7,2,9,6,3,1]
2024-01-01 10:00:00 | DEBUG   | Test passed! ✨

Perfect for interview preparation with professional-grade tooling and beautiful visualizations.

About

Python LeetCode practice environment with automated problem generation, data structure visualizations, and comprehensive testing. Includes all Grind 75, partial Blind, Neetcode and Algomaster problems with enhanced TreeNode/ListNode helpers, CI/CD pipeline, and LLM-assisted problem creation.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Languages