r/shittyprogramming • u/Intrexa • Dec 07 '20
Traveling salesmen problem solved in 0(1) time!
Right now, given a list of n destinations, the current solution for a traveling salesmen to visit each destination once without repeating roads is for the salesmen to not actually do that. There's covid out there, it's just irresponsible to go door to door. The solution is to just stay home.
232
Upvotes
52
u/Cathercy Dec 07 '20
What if he is a doctor with the vaccine? What time complexity is that?
16
u/[deleted] Dec 07 '20
Relevant xkcd
22
u/vigbiorn Dec 07 '20
"All destinations need to be visited some number of times"
Big Brain: "Zero is a number"
5
u/RapidCatLauncher Dec 08 '20
That's so efficient, it's not even O(1), it's O(0)!
1
u/Monkey_Adventures Dec 11 '20
algorithm cant have a big time complexity if there is no time complexity to think about taps forehead
0
u/[deleted] Dec 07 '20
[deleted] — view deleted comment