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 solution is amazing
This is actually clever. I didn't even think to use recursion.
this strangely look like my python solution... x)
Not with rec((x + 1) % 9, y + 1), but with rec((x + 1) % 9, y). But even in this case, to move to the next row, the recursion would need to walk through the current row once again. And only in the second walk, when it is on the last cell, it checks that the cell is filled, it moves to the next row. If (y + 1) is used, then the recursion would change the row every time it meets empty cell.
So elegant!
In my opinion, it is ninja code.
wow, if i think that i'm doing that with a lot of rows i feel bad, but now i know Set's power
Это O(n) а можно O(1)
I was thinking the same thing, I had never thought of using this syntax in functions arguments, useful
This is pretty clever, my solution was nothing like this.
Сначала расстроился что мой код длинее, потом обрадовался что в два раза быстрее
i can't believe i wasn't able to find this solution...
kudos to you
больше похоже на n^2
Short, but when intervals are very big, this solution will get into trouble...
I know right!
Loading more items...