You are viewing a single comment's thread. Return to all comments →
My humble Python solution:
def cutTheSticks(arr): result = [] while arr: result.append(str(len(arr))) short = min(arr) arr = map(lambda x: x - short, arr) #Substruct the minimal value arr = list(filter(lambda x: x > 0, arr)) return result
Cut the sticks
You are viewing a single comment's thread. Return to all comments →
My humble Python solution: