Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Counter solution in Clear category for Ascending List by mlahor
from typing import Iterable
from collections import Counter
def is_ascending(items: Iterable[int]) -> bool:
return not len(items) or sorted(items)==items and Counter(items).most_common(1)[0][1]==1
March 19, 2021