Hello,
import collections
from collections import deque
class select:
def __init__(self):
self.start_pos = -1
pos = select()
#print(pos.start_pos)
list_ = [55,1,22,34,11,12]
new_list = deque([])
def sort_(arr):
length = len(arr)
for i in range(0,length):
max_value_1 = max(arr)
new_list.appendleft(max_value_1)
if max_value_1 in arr:
arr.remove(max_value_1)
print(arr)
return list(new_list)
print(sort_(list_))
I sorted the list of any given order,but is this the right way to sort,according to the algorithms rule.