Intuit interview question

A 2-d matrix leetcode question