Refer for code: -
Failing one testcase
if the last number is even number you still need to put it at last. For example in case
4
1 2 3 4
answer should be 1 3 2 4. but your code gives 1 3 4 2.
Refer for code: -
if the last number is even number you still need to put it at last. For example in case
4
1 2 3 4
answer should be 1 3 2 4. but your code gives 1 3 4 2.