MathWorks interview question

Some general algorithms questions