Sorting Algorithm Time Complexity