Microsoft interview question

Sort without enough space for the whole array