MathWorks interview question

Write a sorting algorithm.