New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Travelling Salesman Dynamic Programming #5118
Comments
import java.io.; public class TSE {
} |
In the fun function, the base case condition mask == ((1 << i) | 3) is incorrect. It should be mask == (1 << (n + 1)) - 1 |
What would you like to Propose?
Feat: Implementing Travelling Salesman dynamic programming approach
Issue details
The TravelingSalesman function calculates the minimum cost to complete a round-trip through all cities, starting and ending at the first city, using dynamic programming with bitmasking to track visited cities.
Additional Information
No response
The text was updated successfully, but these errors were encountered: