give integer array num integer begin array follow odd integersreturn array satisfie condition example 1input num 3124output 2431explanation the output 4231 2413 4213 acceptedExample 2input num 0output 0 Constraints1 numslength 50000 numsi 5000