Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function duplica(l)
- {
- var prev,tmp={};
- if(l==null){return;}
- for(prev=l.testa;prev!=null;prev=prev.succ)
- {
- if(prev.x%2===0)
- { tmp={x:prev.x,succ:null};
- tmp.succ=prev.succ;
- prev.succ=tmp;
- prev=prev.succ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement