means if the input is -> 1 4 3 2 6 8
output = 1 3 2 4 6 8
or will the output = 3 1 4 2 6 8 work?
Do we have to place the nodes in sorted order?
hello @Manvik-Arya-4391661007540658
relative ordering should remian same.
for example.
if 4 comes before 2 in input list.
then in output they should appear in same order.
please provide an example of it
3 4 1 2
output
3 1 4 2 (note relative ordering among odds and even is same as input )
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.