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...