https://codeforces.com/contest/1174/problem/B

https://codeforces.com/contest/1174/problem/B

if there is are both even and odd number in the array than you can swap all the elements with at least one element, and make them in a sorted order by swapping.
https://codeforces.com/contest/1174/submission/55022817
this is my code

1 Like