MathWorks interview question

Solving programming questions using different languages.