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.
And also can solving using the getCandidates, which is more efficient (O(nlog n), backtracking has O(9^nn)
You don't have to do backtracking, you can solve it with a direct algorithm.
I don't think using the brute force algorithm in this would be the way to go because, with simple knowledge of combinations, one can gauge that the computer would have to carry out 9^81 operations for different combinations of solutions to just one sudoku tiles board, which is a crazy number. The most efficient way would be using the backtracking algorithm (recursion)
woow nice use of recursion over there
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Can someone give an explanation for this code
although the solution might be looking compact and has relatively less number of lines, I think you should focus more on the time and space complexity of the program. I am not an expert in this either, but you can do this problem without introducing two new lists and looping through the whole 'integers' list unless when the outlier is in the end.
although the solution might be looking compact and has relatively less number of lines, I think you should focus more on the time and space complexity of the program. I am not an expert in this either, but you can do this problem without introducing two new lists and looping through the whole 'integers' list unless when the outlier is in the end.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
although the solution might be looking compact and has relatively less number of lines, I think you should focus more on the time and space complexity of the program. I am not an expert in this either, but you can do this problem without introducing two new lists and looping through the whole 'integers' list unless when the outlier is in the end.
although the solution might be looking compact and has relatively less number of lines, I think you should focus more on the time and space complexity of the program. I am not an expert in this either, but you can do this problem without introducing two new lists and looping through the whole 'integers' list unless when the outlier is in the end.
Loading more items...