MathWorks interview question

Leetcode Medium Question about Arrays with binary search.