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