Selection sort and test implemented