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.
Hi Brodie,
It did, thanks!
I was going crazy with the order for along time, i just missed this lexicograpthically thing somehow.
My solution is ugly af though, but it works.
I think I was focussing way to hard on the calculation time for generating the boards.
Hi mrhatted,
The description says "sorted lexicographically" - when comparing two strings, look for the first non-matching character. The sorting order is determined by which is earlier in the alphabet.
For example:
"b q ...." < "k b ....",
becauseb < k.
"n k n ....." < "n r n ....",
because the first charactern
is the same, so we look at the second:k < r.
"q n b b ...." < "q n b n ....",
because the first three characters are the same, so we look at the fourth:b < n.
Does that help?
brodiemark
So, how do you pass this one?
I have a function that does exactly as asked.
I just dont know how they sorted their n solutions.