sorts.tim_sort¶
Functions¶
|
|
|
|
|
|
|
|
|
Module Contents¶
- sorts.tim_sort.binary_search(lst, item, start, end)¶
- sorts.tim_sort.insertion_sort(lst)¶
- sorts.tim_sort.main()¶
- sorts.tim_sort.merge(left, right)¶
- sorts.tim_sort.tim_sort(lst)¶
>>> tim_sort("Python") ['P', 'h', 'n', 'o', 't', 'y'] >>> tim_sort((1.1, 1, 0, -1, -1.1)) [-1.1, -1, 0, 1, 1.1] >>> tim_sort(list(reversed(list(range(7))))) [0, 1, 2, 3, 4, 5, 6] >>> tim_sort([3, 2, 1]) == insertion_sort([3, 2, 1]) True >>> tim_sort([3, 2, 1]) == sorted([3, 2, 1]) True