Ad
  • Custom User Avatar

    Initial grid is not extensively tested; every test case is already unique by clues.

    There should be test cases with the same clue but different grids.

  • Custom User Avatar

    Random tests only consists of a small set of fixed inputs, so it is very easy to hard code against all of them.

  • Custom User Avatar

    End trimming for end digits are inconsistent: 2nd row ending 5/6 and 3rd row 2 expects no trimming but everything else expects trimming.

  • Custom User Avatar

    Did it at the end, but... with a shitty solution and it passes...
    Should make the output format the same than the entry format: why this weird std::array at the outpout string ??

  • Custom User Avatar

    Unless you want to teach users about building strings, there is no reason why the output needs to be a string. If this kata is supposed to be beyond 7kyu, then the target audience already knows how to do that. There are perfectly good datastructures to represent grids/matrices; strings aren't one of them.

    I suspect English may not be your first language (no worries), but this sentence is awkward to parse: The first four values in the array are to the right of Grid (from top to bottom). The remaining four values are below Grid (from right to left).
    A better phrasing might be "The first four values of the input array will be the target sums for each row, from top to bottom; the last four values will be the target sums for each column, from left to right."
    I'd also recommed specifying that the input will always consist of 8 values and the game will be played on an 4x4 grid (i.e., no need to write a solution for an arbitrarily sized board)

  • Custom User Avatar

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

  • Custom User Avatar

    I'm 100% I've solved an exact same task in the past.

  • Custom User Avatar

    Ruby 3.0 should be enabled (Refer this for more detail)

  • Custom User Avatar

    Using a built-in operator as a function is a worthless kata idea.