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.
actually, this custom comparator is very clever, so the sorting can be done in O(nlogn) instead of O(n^2).. even if you used qsort here :D
Thanks guys! It is definitely a mistake! I consider it's a method instead of a solution. I have fixed it and please check it.
This solution is wrong...
int map[4], then map['n'] = 1.. are you serious? :) indexing the 110s element of a 4 length array (and the others as well) is clearly a mistake.. you're just lucky you do not overwrite something and that your allocation does not get overridden..
why this works? given walk's length is less than 10, this code breaks
why hard to read? this is a typical pattern for binary search.. for big arrays, this is the best solution :)