DNF Sort - Wrong answer

Hi sir,
I tried to test my code with another input but it gave me the wrong answer. What’s wrong with my code?
Thanks for your help.

My code: https://ide.codingblocks.com/s/252626

hello @halihoof
use if -else if-else
reason is ,by using if-elseif -else we will be performing only one operation/updation per iteration,
which we r not able to maintain using if - if -if

1 Like

Thank you a lot @aman212yadav