Skip to content

Instantly share code, notes, and snippets.

@igez
Last active September 23, 2020 07:53
Show Gist options
  • Save igez/8f347bd63088c335293b3810fe843b6b to your computer and use it in GitHub Desktop.
Save igez/8f347bd63088c335293b3810fe843b6b to your computer and use it in GitHub Desktop.
const distances = [
[1, 42, 33, 49],
[11, 33, [[1, 13, 4], [4, 13, 3]], 91],
[23, 42, 17, 19],
[42, [[32, 11], [12, 9]], 41, 51, 3],
[4, [[13, 3, 1, 4], [19]], 1],
[99, 14, 59]
]
// Distances it’s an array of routes in the case of [a, b, [[c][d]]]
// the traveller can choose between route c or d as he prefers shortest route or longest
// @todo: Find min and max distance possible for variable distances above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment