Done.
Added static and random tests.
static
I see now. This is pretty strange. Maybe Codewars bug?
Bug is in this line:
printLn (bar [1])
bar is partial function, which means it does not handle all possible inputs. It does handle only []. You pass [1] to it and get runtime crash.
bar
Why not
int manhattan_distance(int x1, int x2, int y1, int y2);
?
C translation is ready! Please review and approve.
Function should take one number.
Cool!
This comment is hidden because it contains spoiler information about the solution
There are no random test cases
Mark your comment as having spoiler content.
I could not understand how.
Fixed.
Loading collection data...
Done.
Added
static
and random tests.Done.
I see now. This is pretty strange. Maybe Codewars bug?
Bug is in this line:
bar
is partial function, which means it does not handle all possible inputs. It does handle only []. You pass [1] to it and get runtime crash.Why not
?
C translation is ready! Please review and approve.
Function should take one number.
Cool!
This comment is hidden because it contains spoiler information about the solution
There are no random test cases
Mark your comment as having spoiler content.
I could not understand how.
Done.
Fixed.
Loading more items...