selection sort time complexity calculation