Given an undirected graph with $n$ vertices, where each vertex represents a town and the edges represent roads with varying distances, find the shortest possible route that visits each vertex exactly once and returns to the starting vertex. The graph is represented as an adjacency list or matrix, where the weight of each edge corresponds to the distance between two towns.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak