def shellSort(unsorted_arr):
gap = len(unsorted_arr) // 2
while gap > 0:
for i in range(gap, len(unsorted_arr)):
temp = unsorted_arr[i]
j = i
# Sort the sub list for this gap
while j >= gap and unsorted_arr[j - gap] > temp:
unsorted_arr[j] = unsorted_arr[j - gap]
j = j-gap
unsorted_arr[j] = temp
# Redu ce the gap for the next element
gap = gap//2
arr= [45,89,56,78,90,12,10,2,34,1]
shellSort(arr)
print(arr)