Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
accumulate max (one line) solution in Clear category for Sort by Removing by juestr
from itertools import accumulate
def sort_by_removing(values):
return [x for x, m in zip(values, accumulate(values, max)) if x >= m]
May 16, 2020
Comments: