Selection Sort with Cost