MathWorks Interview Question

Combination math questions, Leetcode median to hard