Working quick sort and selection sort