+ 2

How to sort only odd elements in array, evens stay where they are? Thanks.

https://code.sololearn.com/cjCyOL8zy30A/?ref=app

27th Mar 2022, 6:07 PM
TeaserCode
1 Antwort
+ 3
When this is true, your loop is infinite. if(arr[min] % 2 == 0) continue; And you are missing {} for inner if block.. Correct these, and find next.. hope you can.
27th Mar 2022, 7:10 PM
Jayakrishna 🇮🇳