Retrait de la publication du corrigé de la dichotomie

This commit is contained in:
2026-09-21 10:22:19 +02:00
parent 2f072b1711
commit 0d44ac2fc2
@@ -0,0 +1,10 @@
def recherche(tab:list,x:int)-> bool:
if len(tab) == 0:
return False
m = len(tab) // 2
if tab[m] == x:
return True
elif tab [m] < x:
return recherche(tab[m+1 :],x)
else:
return recherche(tab[:m],x)