Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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 ....", because b < k.

    "n k n ....." < "n r n ....", because the first character n 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

  • Custom User Avatar

    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.