Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Though, there is a reason: speed.
there is no reason to refactor for speed when you lose lisibility.
It is very good:
typedef long long fraction[2]
, is very clean.I agree. I've fixed the C version of the kata accordingly.
A minor point:
I think the test case with no solution (when there is no pixel with the specified colour) should not have failed when the struct unsigned_array returned with {NULL, 0}. It does not make sense to check the pointer when the array size is zero. So the {NULL, 0} answer should be accepted as well, for this case.