Zoek beste algoritme

Sign in to test your solution.
lijst = list(range(1000)) 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 # Laat deze code staan (werking dodona) print("De test zal falen")

  Python sandbox

This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona.

Test case being debugged