Você está na página 1de 5

Pr-ordem

p r under false while not under while p <> ^ VISITA(p) PUSH(p) p SUBEp P P(p) if not under then p SUB!p

In-ordem
p r under false while not under while p <> ^ PUSH(p) p SUBEp P P(p) if not under then VISITA(p) p SUB!p

Ps-ordem
p r under false while not under while p <> ^ PUSH(p"#) p SUBEp P P(p"a) while not under and a $ % VISITA(p) P P(p"a) if not under then PUSH(p"%) p SUB!p

BUSCA (VALOR) achou false; r; a !" #h$le %& ! and no' achou $f I()O * +alor 'hen achou 'rue; else $f I()O & +alor 'hen a ; SUB, ; else a ; SUB- ; I(S,R./O (VALOR) BUSCA(+alor); $f no' achou 'hen ALO0U,( ); I()O +alor; SUB, SUB- !; $f a * ! 'hen r else $f +alor & I()Oa 'hen SUB-a ; 1 else SUB,a ;

Você também pode gostar