Python
Python copied to clipboard
Feature/travelling salesman
Feature/travelling salesman
Fixes #11938
- Implemented TSP (Travelling Salesman Problem) solution using dynamic programming
- Added implementation to dynamic_programming directory
- Added doctest for functionality verification
- Returns optimal cost and path
- Handles edge cases with error handling
Checklist:
- [x] Add an algorithm
- [x] I have read CONTRIBUTING.md
- [x] This PR is my own work
- [x] PR only changes one algorithm file
- [x] All new Python files are placed inside existing directory
- [x] All functions/variables follow Python naming conventions
- [x] All parameters and returns are type annotated
- [x] Doctests pass automated testing
- [x] "Fixes #11938" closes the original issue