MathWorks Interview Question

very hard problems which do not come from Leetcode