Brane interview question

Sort The Array in dsa round