I have some questions about selection sort.I\'m a little bit confused.
int [] arr = {5,4,3,2,1}; // This is my array
int min = 0;
for(int i = 0;i&l
Your question appears to be in your comment
min = i;//Selection sort algorithm says that find the minimum in the
// array, but first element is not minimum.What's point here?
The point of that is you can assume the first one you're checking is the lowest just so you have a place to start from. After all, it might not be the minimum over all, but of the one's you've checked in this iteration, it's the lowest so far!