Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
kata discription is shit
you have VALID_WORDS set
try console.log(VALID_WORDS)
not very easy for newbie as a 7kyu kata if didn't get a clever trick
Oh, I am so careless about the condition, yes, it is a necessary but not enough condition. Thanks! It is really a hard kata
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.
according to kata description:
Note: The minimum of givens required to create a unique (with no multiple solutions) sudoku game is 17.
so the first one should have unique solution, for it has 29 givens (>17), why there are multiple solutions?
original puzzle is valid, and solvable, and > 17 givens, so it should pass the test. maybe the description is somewhere wrong
The first solution is not unique, this one works too:
I suspect the other may be the same case.
ruby random test:
puzzle:
[[8, 0, 0, 5, 0, 0, 0, 0, 3], [0, 0, 5, 0, 6, 0, 1, 0, 0], [7, 0, 0, 0, 0, 1, 0, 2, 4], [0, 5, 0, 0, 8, 0, 3, 0, 0], [1, 0, 0, 0, 0, 0, 2, 0, 7], [0, 0, 7, 0, 2, 0, 0, 4, 0], [5, 7, 0, 3, 0, 0, 0, 0, 6], [0, 0, 3, 0, 4, 0, 7, 0, 0], [4, 0, 0, 0, 0, 5, 0, 0, 9]]
my solved:
[[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, 4, 9, 8, 7, 3, 6, 1], [1, 3, 9, 4, 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]]
why Value is not what was expected??? many random test in ruby seems uncorrect.
[[3, 0, 0, 0, 0, 5, 0, 0, 8], [0, 0, 1, 0, 6, 0, 5, 0, 0], [4, 2, 0, 1, 0, 0, 0, 0, 7], [0, 0, 3, 0, 8, 0, 0, 5, 0], [7, 0, 2, 0, 0, 0, 0, 0, 1], [0, 4, 0, 0, 2, 0, 7, 0, 0], [6, 0, 0, 0, 0, 3, 0, 7, 5], [0, 0, 7, 0, 4, 0, 3, 0, 0], [9, 0, 0, 5, 0, 0, 0, 0, 4]]
[[3, 9, 6, 4, 7, 5, 1, 2, 8], [8, 7, 1, 9, 6, 2, 5, 4, 3], [4, 2, 5, 1, 3, 8, 6, 9, 7], [1, 6, 3, 7, 8, 4, 9, 5, 2], [7, 8, 2, 6, 5, 9, 4, 3, 1], [5, 4, 9, 3, 2, 1, 7, 8, 6], [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]]
Value is not what was expected
thanks for notice where i am wrong
the kyu values are all over the place, I've seen pretty hard 7 and 6 kyu and really easy 4 kyu.
Read the note or the last post.
https://www.timeanddate.com/calendar/?year=1001&country=22
should be: 3 - Expected: 3, instead got: 1
error in 1001 in ruby
My guess is that you modified the input string instead of returning a new one ...
[40,29,13,21,31,10,49,40,40,4]
for first 40, 40 % [40,29,13,21,31,10,49,40,40,4].size == 0, so 40 is alone in result arr,
but for nex 29, why 29 is alone??? it is not 29 % [29,13,21,31,10,49,40,40,4].size = 29 % 9 = 2,
so [29, 13] is result??? at this moment should get [40,[29,13],21,31,10,49,40,40,4]
it is not a good description for this kata, making so confused
1000+ people solved it without a problem...
This comment is hidden because it contains spoiler information about the solution
Loading more items...