I haven't tried to coded a sort with just one for loop - but with some "spaghetti code", it should be possible (to do a bubble sort with recursive calls are also possible - with only one for loop, but it wasn't what I was thinking about).
But then you are right - it will no longer be a bubble sort, if it is done with "spaghetti code"
Joined: Oct 13, 2005
You mean a spaghetti sort? That sounds like a new algorithm, which ought to be published