MathWorks interview question

Combination math questions, Leetcode median to hard