Google interview question

Sort array of objects with unique ids