Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
numpy product of gradient solution in 3rd party category for Ascending List by Raszlo
import numpy as np
from typing import Iterable
def is_ascending(items: Iterable[int]) -> bool:
try:
return np.prod(np.gradient(items)>0)
except ValueError:
return True
May 5, 2020
Comments: