Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function insert(t,v)
- {
- var cur,i,c1=0;
- if(t.root==null){return v;}
- cur=t.root; for(i=0;i<v.lenght;i++)
- {
- if(cur.x!=v[i]){c1++;}
- if(c1==v.lenght){v.push(cur);}
- } insert(t.left,v);
- insert(t.right,v);
- return v;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement