Selection sort Nth