Hey all, I'm having problems with the selection sort algorithim!
What I'm having trouble with is finding the smallest variable in an array compared to all the others...I thought you could do an if statement going through every element with &&...But I realise that would be inpractical and quite lengthy for a large array.
My professor hasn't gone over the principles of the Selection Sort very well....Infact, all he said was the obvious of 'swapping the smallest variable with [0] and increment i (Which I understand that bit)....Because he skipped out on a detail, I'm guessing this is meant to be common sense...But I have been ill for the past 2 days, and any thinking with either the right or left side of my brain causes migraines....But that hasn't stopped me wanting to learn.
Any help/nice memory jog would be much appreciated.
- Twigstar