MathWorks interview question

Leetcode medium level questions on 2 D arrays