Ad
  • Custom User Avatar

    I came back to it a month later, and re-wrote the solution and it worked. Really good Kata

  • Default User Avatar

    How many tests are there in the random tests?

    I have a solution that keeps timing out after about 10,000 tests, and I'm struggling to make it more efficient. There's no brute force in my solution.

    It would be nice to know if it needs to get 10% or 100x more efficient

  • 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

  • Custom User Avatar

    Fixed

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    The Markdown on the Clues section are messed up. They should be fixed ;-)

  • Custom User Avatar

    For a new pple, exceptions should be created outside SoulutionTest.class like a regular multiple classes in one file.

  • Custom User Avatar
  • Custom User Avatar

    "Left of" clues mean that s1 is in any column that is to the left of the colum s3 is in. (I hadn't noticed the example didn't make that clear as both left of clues are to the immediate left, but that is not a constraint). In other words, using A < Q and given that Q is in column 4, then A may be in columns 0,1,2, or 3.

    "Next to" clues mean that the two object are in columns that are directly next to each other. So in the case of AQA and given Q is in column 2, then A must be in column 1 or 3.

  • Custom User Avatar

    Regarding the description; there's some ambiguity, could you clarify the description?

    a. "Left of" clue: "This clue means that s1 exists in a column to the left of the column containing s3 --> This does not mean they are necessarily next to each other"
    Is that the immediate left of the column containing s3, or any column to the left of s3?
    Does "next to each other" mean "next to each other in the same row"?

    b. "Next to" clue: " This clue means that s1 exists in a column next to the column containing s2"
    Does this mean the immediate left or right of the column containing s2, or any column to the left of right of s2 (i.e. "not the same column as s2")?

    Thanks!

  • Default User Avatar

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

  • Default User Avatar

    Did you find the solution/answer for this. I have the exact same question.

  • Custom User Avatar

    I didn't tune the tests here, actually. For this time, it's all on the author's back... ;)

  • Custom User Avatar

    I would say you should go the way of making language versions proportional in terms of time. If java performance tests take X% of allowed time, put as many test cases in Ruby so they will also take X% of available time.

    Usually it's enough for performance tests to run ~6s or so, so user has some margin and they can focus on general approach rather than microoptimisations. I have no idea how intensive java tests are, but knowing B4B I'd guess X is nothing like 50%, tho :) If it would mean that Ruby has 100x fewer tests than Java, then it's OK. Anyway, no one would expect more from Ruby, right? ;)

  • Loading more items...