Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Count diffs solution in Clear category for Not in Order by kkkkk
def not_order(data: list[int]) -> int:
"""Return number of items in a different position after sorting the list."""
return [o != s for o, s in zip(data, sorted(data))].count(True)
Nov. 12, 2022