I was looking through the selection sort algorithm on cprogramming.com and I think I found an error in the implementation.
If you work through the algorithm, there's a variable called "index_of_min" which I believe should be "index_of_max" (since when I tested it, it was sorting largest to smallest).
Thinking that it was a typo or a minor mistake, I checked out some other websites like wikipedia and some lesser known websites like geekpedia. It seems like they are call it index of min.
When I ran it through the debugger, it really seemed to me that it's the max value's index. Am I making a mistake somewhere?
Edit: As Svante pointed out, only the cprogramming implentation is wrong. Wikipedia and Geekpidia are fine.