This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

13 lines
302 B
Python

def InsertionSortTuple(tup):
lst = list(tup)
for step in range(1, len(lst)):
key = lst[step]
j = step - 1
while j >= 0 and key < lst[j]:
lst[j + 1] = lst[j]
j = j - 1
lst[j + 1] = key
lst.reverse()
ans = tuple(lst)
print(ans)