Python Array Sort Time Complexity