Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGOIT(T,L)
- STL=STX=STP=LAST=NIL
- CT=T
- while(ct!=NIl || st!=NIL)do
- if(ct!=NIL)then
- p=ct->k%2
- stp=push(stp,cp)
- st=push(st,ct)
- ct=ct->dx
- else
- ct=top(st); cp=top(stp)
- if(last!=ct->sx && ct->sx!=NIL)then
- Ld=val
- if(p=0)then
- x=new_node(ct->k)
- stx=push(stx,x)
- stl=push(stl,l)
- ct=ct->sx
- L=x
- else
- ct=ct->sx
- L=LD
- else
- if(ct->sx=NIL)then
- Ld=val
- if(p=0)then
- x=new_node(ct->k)
- L=NIL
- x->next=LD
- + uscita algo
- else
- L=NIL
- + uscita algo
- else
- if(p=0)then
- L=val
- top(stx)->next=Ld
- + uscita algo
- else
- L=val
- + uscita algo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement