Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple yield solution in Clear category for Reverse Every Ascending by Wartem
def get_items(items):
temp = []
for i, item in enumerate(items):
if i < len(items):
temp.append(items[i])
if (i != len(items) - 1) and (items[i] < items[i + 1]):
continue
else:
yield temp
temp.clear()
def reverse_ascending(items):
res = []
for item_ in get_items(items):
item_.sort(reverse=True)
for it in item_:
res.append(it)
return res
July 28, 2022
Comments: