CSC403: Put: Recursive [4/9] |
public void putLeft (int key) { if (root==null) { root = new Node (key); } else { putLeft (root, key); } } private static void putLeft (Node x, int key) { if (x.left == null) x.left = new Node (key); else { putLeft (x.left, key); } }
Make it recursive.