(lst)
| 18 | |
| 19 | |
| 20 | def insertion_sort(lst): |
| 21 | length = len(lst) |
| 22 | |
| 23 | for index in range(1, length): |
| 24 | value = lst[index] |
| 25 | pos = binary_search(lst, value, 0, index - 1) |
| 26 | lst = lst[:pos] + [value] + lst[pos:index] + lst[index+1:] |
| 27 | |
| 28 | return lst |
| 29 | |
| 30 | |
| 31 | def merge(left, right): |
no test coverage detected