formatte file

This commit is contained in:
2025-04-01 14:28:43 +02:00
parent f2ae2cbc13
commit e03e5458aa
77 changed files with 1231 additions and 945 deletions

View File

@@ -4,10 +4,10 @@ def calcul_taille(arbre, sommet):
while reste:
if arbre[sommet].voisin_gauche():
sommet = arbre[sommet].voisin_gauche()
i+=1
i += 1
elif arbre[sommet].voisin_droite():
sommet = arbre[sommet].voisin_droite()
i+=1
i += 1
return i
@@ -15,11 +15,11 @@ def correction(arbre):
if arbre.est_vide():
return 0
else:
return 1+correction(arbre.gauche()) + correction(arbre.droite())
return 1 + correction(arbre.gauche()) + correction(arbre.droite())
def hauteur(arbre):
if arbre.est_vide():
return -1
else:
return max([arbre.droite(),arbre.gauche()])
return max([arbre.droite(), arbre.gauche()])