Array Sorting Time Complexity