Implemented Generic Selection Sort