Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALGO_IT(T,k1,k2,L)
- ST=STL'=LAST=NIL
- CT=T
- while(ct!=nil || st!=nil)do
- if(ct!=nil)then
- st=push(st,ct)
- ct=ct->f1
- else
- ct=top(st) //risalita
- if(last!=ct->f2 && ct->f2 !=nil)then //QUI CATTURO IL PRIMO VALORE F1 E PREPARO F2
- L'=val
- ct=ct->f2
- stl=push(stl,l)
- L=L'
- else
- if(last!=ct->f3)then //QUI CATTURO IL VALORE DI F2 E PREPARO F3
- L'=val
- stl'=push(stl,l)
- L=L'
- ct=ct->f3
- else //CATTURO F3
- L'=val
- if k1<=T->key<=k2 then
- L = ALLOCA_NODO()
- L->key = T->key
- L->next = L'
- +USCITA
- else
- L = l'
- +USCITA
- return L
Add Comment
Please, Sign In to add comment