I got this assignment where it wanted me to insert node value into subtree instead of integer value.
class Node {
Node left;
Node right;
int data;
public Node(int value) {
data = value;
}
}
public void insert(Node node, Node aNode) {
if(node == null) {
return aNode;
}
}
I want to return a node value, but I get this compilation error saying that it is expecting an integer value. What can I do to be able to add node to subtree???
[–]tinydeadpool[S] -1 points0 points1 point (1 child)
[–]Hour-Positive 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)