Enseignement de l'informatique et du numérique au lycée Boissy d'Anglas
https://icn-isn-boissy.yj.fr/wp/2022/09/12/calcul-hauteur-arbre-binaire/
Export date: Thu May 16 4:59:52 2024 / +0000 GMT

Calcul hauteur arbre binaire


Algorithme :


VARIABLE
T : arbre
x : noeud

DEBUT
HAUTEUR(T) :
  si T ≠ NIL :
    x ← T.racine
    renvoyer 1 + max(HAUTEUR(x.gauche), HAUTEUR(x.droit))
  sinon :
    renvoyer 0
FIN
		

Arbre :


Calculs :


Auteur : David Roche

Post date: 2022-09-12 09:17:25
Post date GMT: 2022-09-12 07:17:25

Post modified date: 2022-09-12 09:17:30
Post modified date GMT: 2022-09-12 07:17:30

Export date: Thu May 16 4:59:52 2024 / +0000 GMT
This page was exported from Enseignement de l'informatique et du numérique au lycée Boissy d'Anglas [ https://icn-isn-boissy.yj.fr/wp ]
Export of Post and Page has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com