Question not clear

do we need to sort even set and odd set in final output

first you have to place all odd nos and then even nos
order should remain same as in the given list

no need to do sorting

for Example
3 4 2 35 4 63

output should be
3 35 63 4 2 4