CSC300 / CSC402: Does this work? [7/7] Previous pageContents

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

Previous pageContents