mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 03:07:46 +08:00
Various ruff fixes (#12821)
This commit is contained in:
@ -19,7 +19,7 @@ def insertion_sort(lst):
|
||||
for index in range(1, length):
|
||||
value = lst[index]
|
||||
pos = binary_search(lst, value, 0, index - 1)
|
||||
lst = lst[:pos] + [value] + lst[pos:index] + lst[index + 1 :]
|
||||
lst = [*lst[:pos], value, *lst[pos:index], *lst[index + 1 :]]
|
||||
|
||||
return lst
|
||||
|
||||
|
Reference in New Issue
Block a user