Ad
  • Custom User Avatar

    Sorry about the delay. Approving this translation, just wanted to convey the original idea with the encoding:

    111001001 --> ~~~--~--~0 --> -1

    So the "expected" solution would be more like:

    start an accumulator at 0
    for every bit, going backwards:
      if the bit is 0:
        negate the accumulator
      else:
        take the bitwise complement of the accumulator
    return the accumulator
    
  • Custom User Avatar

    I really don't see why not count the submit tests since you are able to print debug statements and see the expected value in them. But so be it -- I have added example tests for inputs up to 4 bits.

  • Custom User Avatar

    The test cases. If this were an actual encoding you wouldn't have those to break it.

  • Custom User Avatar

    Something along these lines should be added to the details:
    "The bounds of the intersection area are inclusive, meaning that two circles that touch at an integer point without overlapping such as [0,0,1] and [2,0,1] will expect a return value of 1"