added code for selection and counting sort.