andioop@programming.dev to Programming Horror@programming.devEnglish · edit-211 months agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square55fedilinkarrow-up1213arrow-down121
arrow-up1192arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-211 months agomessage-square55fedilink
minus-squareodium@programming.devlinkfedilinkarrow-up7·11 months agoHave you tried seeing if the recursive approach runs faster?
minus-squarenoddy@beehaw.orglinkfedilinkarrow-up13·11 months agoI know an even better way. We can make it run in O(1) by using a lookup table. We only need to store 2^64 booleans in an array first.
Have you tried seeing if the recursive approach runs faster?
I know an even better way. We can make it run in O(1) by using a lookup table. We only need to store 2^64 booleans in an array first.