This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingVisit every city once and return for the cheapest tour.
What this asks
Visit every city once and return for the cheapest tour.
dp[mask][city] is the cheapest way to cover the mask and stand in the city; try every unvisited next stop.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing