give array integer num half integer num odd half evensort array numsi odd odd numsi evenreturn answer array satisfy condition example 1input num 4257output 4527explanation 4725 2547 2745 acceptedExample 2input num 23output 23 constraints2 numslength 2 104numslength evenhalf integer num even0 numsi 1000 follow up could solve inplace