Generation

time complexityFri, 13 Jan 2023

import random def tsp(n): path = [i for i in range(n)] random.shuffle(path) return path tsp(10)

O(n)

Questions about programming?Chat with your personal AI assistant