Given:
private BinaryNode insert(T data, BinaryNode node) { if (node == null) { return new BinaryNode(data); } else if (data.compareTo(node.getData()) < 0) { node.setLeft(insert(data, node.getLeft())); } else if (data.compareTo(node.getData()) > 0) { node.setRight(insert(data, node.getRight())); } else {//entry exists if (node.getRight() != null) { BinaryNode minNode = findMin(node.getRight()); minNode.setLeft(new BinaryNode(data)); } else { node.setRight(new BinaryNode(data)); } } return node; }and
insert(55, topNode)
There are no hints for this question