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) { BinaryNodeminNode = findMin(node.getRight()); if (data.compareTo(minNode.getData())== 0) {//update minNode.setRight(new BinaryNode (data)); } else { minNode.setLeft(new BinaryNode (data)); } } else { node.setRight(new BinaryNode(data)); } } return node; }
and
What would the following method call result in:
insert(55, topNode)
Choices are:
There are no hints for this question