Ad
  • Default User Avatar

    The question I want to ask is, whether this kata can be solved by pure logic instead of relying on algorithms to "try to get" a possible result?
    In the sample test, I tried to use logic to infer the possibility of each cell. The final best result was to identify the leftmost and rightmost cells of the first row as C and E (and I was not sure which was C or E).
    The rest parts can only rely on algorithms, not logic. In that case, I decided to give up.
    If there is a better logical inference, please give me some tips, because I am stupid. O_o

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Really wanna make a ruby translation for this kata, but I don't sure - what should be perfomance expectations? I mean, 40k tests for Ruby for this kata is impossible to be done in 12 seconds. Is there some rules or way to calculate fair expectations? I spend hours solving Marple puzzles on iPad, algorothmized all ways to reduce board possible values, then refactored my solution, but best perfomance I could reach for now - about 400 tests per 12 seconds (in codewars environment). It's much better than any brute force solution written in Ruby, but comparing with Java 40k tests - 400 looks like nothing.

  • Custom User Avatar

    Damn, that was something... Gave me a head ache... x/
    Really nice. Not so happy with my solution, tho... (in the end, I went for "write just something that works. period." :/ ... Looking at it, I see I even forgot to remove debugging stuff. I even may have unused methods in there... x) )

    One thing: it would be far more logical that you use a constructor+method call rather than a static method. There are plenty of stuff to store to solve that, so the instance is the good way.