alphacyberranger@sh.itjust.works to Programmer Humor@programming.devEnglish · 2 years agoNot everything can be done in constant time, that's O(k)sh.itjust.worksexternal-linkmessage-square41linkfedilinkarrow-up1414arrow-down111
arrow-up1403arrow-down1external-linkNot everything can be done in constant time, that's O(k)sh.itjust.worksalphacyberranger@sh.itjust.works to Programmer Humor@programming.devEnglish · 2 years agomessage-square41linkfedilink
minus-squarecatastrophicblues@lemmy.calinkfedilinkarrow-up2·2 years agoSurely you could implement this via a sorting algorithm? If you can prove the distance function is a metric and both lists contains elements from the same space under that metric, isn’t the answer to sort both?
minus-squarejjagaimo@lemmy.calinkfedilinkarrow-up7·2 years agoIt’s essentially the traveling salesman problem
Surely you could implement this via a sorting algorithm? If you can prove the distance function is a metric and both lists contains elements from the same space under that metric, isn’t the answer to sort both?
It’s essentially the traveling salesman problem