Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGO_IT(T)
- ST=STX=LAST=NIL
- CT=T
- while(ct!=NIL || st!=NIL)do
- if(ct!=NIL)then
- ret=1
- st=push(st,ct)
- stx=push(stx,x)
- ct=ct->dx
- else
- x=top(stx); ct=top(st)
- if(last!=ct->sx && ct->sx!=NIL)then
- a=val
- sta=push(sta,a)
- pop(stx)
- x=a+x
- stx=push(stx,x)
- ct=ct->sx
- else
- if(ct->sx=NIL)then
- a=val
- x=a+x
- y=1
- ret=x*1*ct->key
- + uscita
- else
- y=val
- ret=x*y*ct->key
- + uscita e pop vari
Add Comment
Please, Sign In to add comment