Zoek het beste algoritme

Sign in to test your solution.
def is_sorted_1(lst): for i in range(len(lst)): for j in range(i + 1, len(lst)): if lst[i] > lst[j]: return False return True def is_sorted_2(lst): for i in range(len(lst) - 1): if lst[i] > lst[i + 1]: return False return True # PROGRAMMEER HIERONDER DE TIJDSMETINGEN lijst = list(range(1000))