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.
What is
0;
before return line?As we are creating a sudoku validator, we can not make assumptions regarding the inputs. We need to take care of all conditions. If you see the example 2 in the question, there are 0s in the sudoku puzzle.
What if you replace all 9's by 10's and all 1's by 0's in a valid sudoku?
std::move should not be used here in return statement. It prevents Return Value Optimization (RVO).
More information here - https://vmpstr.blogspot.com/2015/12/redundant-stdmove.html