I’ve done the Binary exercise in the Roc track. I’ve found out that:
- There is no test case with the input being the empty string.
- Most solutions return 0 when the input is the empty string.
Regarding 2. this is the natural thing to do when one implements the algorithm without thinking about this edge case. But I believe the result is wrong. The empty string is not a binary representation of a number; therefore the result should be an error.
I don’t know how this is handled in other language tracks.