Are you a moron? He's trying to do bubble sort with a single for loop. It's just an algorithm problem not something a stack trace can fix my good god you are stupider than my dick
Evan Lopez
are you trying to sort? Me thinks you need to look at how minmax algo looks like
James Turner
Yes I know it's a bubble sort but for all I know he forgot a semi colon somewhere. It's easier to debug a stacktrace rather than code.
Benjamin Hill
"Doesn't work" in this case isn't a compiler error actually. Just realized that. He needs two for loops lol
Isaiah Russell
Look at the for loop doing the swapping.
Write out an example, and increment 'i' as you go. Look at what happens when it does its final comparison of the value of 'i'.
Your for loops all technically iterate the same number of times. You should iterate up to 'i < size - 1' (not