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
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.
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"
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:
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.
The test cases. If this were an actual encoding you wouldn't have those to break it.
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 of1
"