@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.
@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 :)
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?
Some crazy solution