Re: SORTING ALGORITHMS...
First, read this on Selection Sort: Selection sort - Wikipedia, the free encyclopedia.
Make sure you are following that algorithm.
If the length of the arrary is n, you will make n passes. On your (i)th pass, you need to find the (i)th smallest number and insert it at index i.
In a selection sort, the max doesn't matter, only the min matters.
Re: SORTING ALGORITHMS...
or only the max matters and the min doesn't matter (depending on how you want to sort).
Re: SORTING ALGORITHMS...
Actually I appreciate your help both of you...
but this is a MODIFIED SELECTION SORT :D
The purpose is to find min and post it at beginning, find max and post it at the end in every pass...