Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
3-liner solution in Creative category for Reverse Every Ascending by Stensen
def reverse_ascending(l):
a, r=[0]+[i+1 for i in range(len(l)-1) if l[i]>=l[i+1]]+[len(l)], []
for i, j in list(zip(a, a[1:]+a[:1]))[:-1]: r.extend(reversed(l[i:j]))
return r
Sept. 24, 2020