Advertisement
Meruem

Albero_Di_Ricerca_aggiungi

Apr 26th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.aggiungi=
  2. function(k)
  3. {
  4.         if(k<this.sinistro)
  5.         {
  6.             if(this.sinistro==null)
  7.             {
  8.                 this.sinistro=newAlberoDiRicerca(k);
  9.             }else
  10.                 {
  11.                     this.sinistro.aggiungi(k);
  12.                 }
  13.         }
  14.             if(k>this.destro)
  15.             {
  16.                 if(this.destro==null)
  17.                 {
  18.                     this.destro=newAlberoDiRicerca(k);
  19.                 }else
  20.                     {
  21.                         this.destro.aggiungi(k);
  22.                     }
  23.             }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement