@andioop to Programming HorrorEnglish • edit-210 months agoGod I wish there was an easier way to do thisimagemessage-square55arrow-up1216arrow-down121
arrow-up1195arrow-down1imageGod I wish there was an easier way to do this@andioop to Programming HorrorEnglish • edit-210 months agomessage-square55
minus-square@[email protected]linkfedilink13•10 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.