REKURSIVT med referens: /** * Insert a new item in tree. * @param x the item to insert. */ public void insert(E x) { insert(x, root); } /* Insert the element x into the subtree with root n */ private void insert(E x, BinaryNode &n) { if(n == null) { n = new BinaryNode(x); } elseif (n.getElement().compareTo(x) > 0) { insert(x, n.getLeft()); } else { insert(x, n.getRight()); } }