DNF sort in sorting


the algorithm taught us is failing at array 1 0 2 1 0 2

Hey Nirupama!,nice catch BTW, but the concept is not wrong.
https://ide.codingblocks.com/s/229403 instead of if use else if to avoid multiple checks within same iteration

1 Like