Ad
  • Custom User Avatar

    kata discription is shit

    you have VALID_WORDS set
    try console.log(VALID_WORDS)

  • Custom User Avatar

    That condition is necessary but not enough. You can be sure that with less than 17 you can't have unique solutions, but as you see, with 29 givens you still can have multiple solutions.

  • Custom User Avatar

    The first solution is not unique, this one works too:

    [[8, 2, 1, 5, 7, 4, 6, 9, 3], 
     [3, 4, 5, 2, 6, 9, 1, 7, 8], 
     [7, 9, 6, 8, 3, 1, 5, 2, 4], 
     [2, 5, 9, 4, 8, 7, 3, 6, 1], // In these 2 files we swapped 9 and 4 of the 3rd and 4th columns
     [1, 3, 4, 9, 5, 6, 2, 8, 7], 
     [6, 8, 7, 1, 2, 3, 9, 4, 5], 
     [5, 7, 8, 3, 9, 2, 4, 1, 6], 
     [9, 1, 3, 6, 4, 8, 7, 5, 2], 
     [4, 6, 2, 7, 1, 5, 8, 3, 9]]
    

    Or it should raise an error in cases of: invalid grid (not 9x9, cell with values not in the range 1~9); multiple solutions for the same puzzle or the puzzle is unsolvable

    I suspect the other may be the same case.

    [[3, 9, 6, 4, 7, 5, 1, 2, 8], 
     [8, 7, 1, 9, 6, 2, 5, 3, 6], 
     [4, 2, 5, 1, 3, 8, 4, 9, 7], 
     [1, 6, 3, 7, 8, 4, 9, 5, 2], 
     [7, 8, 2, 3, 5, 9, 6, 4, 1], 
     [5, 4, 9, 6, 2, 1, 7, 8, 3], 
     [6, 1, 4, 2, 9, 3, 8, 7, 5], 
     [2, 5, 7, 8, 4, 6, 3, 1, 9], 
     [9, 3, 8, 5, 1, 7, 2, 6, 4]]
    
  • Custom User Avatar

    the kyu values are all over the place, I've seen pretty hard 7 and 6 kyu and really easy 4 kyu.

  • Custom User Avatar
  • Custom User Avatar

    My guess is that you modified the input string instead of returning a new one ...

  • Custom User Avatar

    1000+ people solved it without a problem...

  • Custom User Avatar

    what I get is this

    supose you receive 'AAAB', then all posibilities are (always based on the letters)

    AAAB = 1
    AABA = 2
    ABAA = 3
    BAAA = 4

    if you get 'ABAB', all posibilities are (if I don't miss anything)

    AABB = 1
    ABAB = 2
    ABBA = 3
    BAAB = 4
    BABA = 5
    BBAA = 6

    and the task is to return the correct index

  • Custom User Avatar

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

  • Custom User Avatar

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