Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Reverse Every Ascending by nikita0063
def reverse_ascending(items):
buffer = []
for i, el in enumerate(items):
buffer.append(el)
if i == len(items)-1 or el >= items[i + 1]:
yield from reversed(buffer)
buffer = []
Dec. 29, 2020