leetcode: Valid Sudoku

1) Never assume the validity of the size of the input. 2) The point of the problem is to see if you could write elegant and compact code rather than check your algorithm skills. I will show how to optimize the code step by step and finally got a copy of code of 31 lines.
Read More