Each level of recursion needs its own row and column variables. That is, row and column should be inputs to solveArray
and outputs of findUnassignedLocation
instead of being member variables. As it is, when there is backtracking the row and column of the failed level get reused by the caller.
Given that some assigned locations are being overwritten, maybe findUnassignedLocation
also contains an error.
Given that the result is invalid, maybe possibleNumbersForRow
also contains an error.