CSC300 / CSC402: Does this work? [6/7] |
01 |
public void insert (double item) { first = insertH (first, item); } private static Node insertH (Node x, double item) { if (x == null || x.item >= item) { return new Node (item, x); } else { insertH (x.next, item); return x; } } |