selection sort time complexity analysis