selection sort algorithm time complexity analysis