Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
7-liner: Sorted By Copy And Clear solution in Clear category for Sort by Removing by Stensen
def sort_by_removing(values: list) -> list:
copy = values.copy()
values.clear()
for n in copy:
if not values: values.append(n)
elif n >= values[-1]: values.append(n)
return values
Oct. 16, 2020
Comments: