Yours is behaving most like a Bubble Sort. In selection sort it finds the min element and swaps only once per pass, but here you are swaping multiple times in a single pass.