iView Labs interview question

Sorting algos.(asked me to write the code)