• odium
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    Have you tried seeing if the recursive approach runs faster?

    • noddy@beehaw.org
      link
      fedilink
      arrow-up
      13
      ·
      1 year ago

      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.