Untitled
unknown
plain_text
2 years ago
341 B
7
Indexable
Parcours en largeur
DEBUT
PARCOURS-LARGEUR(T) :
enfiler(T, f) //on place la racine dans la file
tant que f non vide :
x ← defiler(f)
traiter x.clé
si x.gauche ≠ NIL :
Tg ← x.gauche
enfiler(Tg, f)
fin si
si x.droit ≠ NIL :
Td ← x.droite
enfiler(Td, f)
fin si
fin tant que
FIN
Editor is loading...
Leave a Comment