alphacyberranger@sh.itjust.works to Programmer HumorEnglish · před 6 měsíciNot everything can be done in constant time, that's O(k)sh.itjust.worksimagemessage-square41fedilinkarrow-up1415arrow-down111
arrow-up1404arrow-down1imageNot everything can be done in constant time, that's O(k)sh.itjust.worksalphacyberranger@sh.itjust.works to Programmer HumorEnglish · před 6 měsícimessage-square41fedilink
minus-squarecatastrophicblues@lemmy.calinkfedilinkarrow-up2·před 6 měsíciSurely 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·před 6 měsíciIt’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