Help Python Sort Algorithm Complexity