Autodesk interview question

Sort arrays in particular orders