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.
Man my code works without any problem in the fixed tests, but when it comes to the random tests it just breaks
Great kata of the series, well done.
Did the triple backticks. It looks good - thanks.
Markdown still kinda scuffed - don't use
`single backticks`
over multiple lines. Either close the backticks on every line or useHi 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.
I added two examples of large values to the sample and fixed tests in all the translations.
Thanks!
Lua translation!
Will do when I get a chance, probably Tuesday.
Have another suggestion (let you see): as I clicked several times before passing (waiting for the random tests NOT to generate such a case).. it means that invalid solutions may pass..
you should add such a case in the fixed tests. And may be in the first given tests.
Hopefully fixed :D
oh sorry! I know where this comes from, I just need to pay more attention to get rid of the habit! I'll prepare a fork soon.
please, the snake case again ..
Loading more items...