You are viewing a single comment's thread. Return to all comments →
python
def cutTheSticks(arr): f=[] while True: f.append(len(arr)) m=min(arr) for i in range(len(arr)): arr[i]=arr[i]-m for j in range(len(arr)): try: l=arr.index(0) arr.pop(l) except:pass if len(arr)<1: break return f
Cut the sticks
You are viewing a single comment's thread. Return to all comments →
python