#
# c , lst
# , lst , , lst
def FastSort(lst,start,end,desc=False):
right = start
left = end
store = lst[right]# lst[0]
while right = lst[right]:# lst[0]
right = right + 1#
if right left:
FastSort(lst,left+1,end)
if desc:
print(lst[::-1])
else:
print(lst)
if __name__ == ' __main__':
lst = [0,0,0,0,0,23,2,0,1,2,67,2,45,9,4,78,4,5]# 000000
FastSort(lst,0,len(lst)-1,desc=True)
:
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 23, 1, 2, 67, 2, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 2, 2, 1, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 67, 23, 45, 9, 4, 78, 4, 5]
[0, 0, 0, 0, 1, 2, 2, 2, 5, 23, 45, 9, 4, 4, 67, 78]
[0, 0, 0, 0, 1, 2, 2, 2, 4, 4, 5, 9, 45, 23, 67, 78]
[0, 0, 0, 0, 1, 2, 2, 2, 4, 4,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