Databricks interview question

Sorting a matrix by find a missing number