CSC300: Does this work? [11/13] Previous pageContentsNext page

01
02
03
04
05
06
07
08
09
10
11
  public void insert (double item) {  
    insertH (first, item);
  }
  private static Node insertH (Node x, double item) { 
    if (x == null || x.item >= item) {
      return new Node (item, x);
    } else {
      x.next = insertH (x.next, item);
      return x;
    }
  }

Previous pageContentsNext page