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.
@Olegkovtun - Wow, that one is great. Very clever, efficient, readable, and understandable. I am super impressed with yours.
The chosen answer above is clever in that it uses very few lines but it fails in the other 3 categories so I am not sure why some people voted it as a best practice.
My solution has only 2 cycles, less code and clear enough :)
That's what I figured eventually. But this is a poor description of the kata objective. You you rewarding people who happen to think like the author, rather than the people who get the right solution based on the description, which is strctly speaking impossible since the description is incomplete.
In the description of Kata must be info, that it could be more moves after winning move.
Hi,
no issue here. It's up to your code to identify when the winning move happens and you have to stop there, even if you have a list with more moves. For the fourthTest, the winning move is effectively the 22th and you should so stop there and return the output.
cheers
Its arguinging whos solution is more understandable) Lets do some refactoring and compare our solutions for clearing.
faster but, longer and not clear
I think my solution is faster
Do you think that you have better solution?
and...?
But, we don't have resizable array, we know that sudoku has constant amount of cell - 9*9)
Dont see 4 loops everyday))) And your solution not very efficient, if I understand your solutin correct, its O(n2), isnt it?
Can you explain why?
I think that randomTest and atleast fourthTest is wrong because, by the rules, game MUST BE STOPPED when either red or yellow player win. So no new moves. But in test fourthTest and randomTest there are moves after winning move and I think that its incorrect. For example in test fourthTest, move 22 (E_Red) is winning move for RED (two diagonals), but game continues. So IMHO - or you dont allow moves after winning move(wich is corect by the rules because it is the end of the game), or, atleast, in the description of Kata must be info, that it could be moves after winning move.
Some crazy solution
Loading more items...