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 date: Thu May 16 10:50:13 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
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com