SyntaxFix
Write A Post
Hire A Developer
Questions
This tree is not a binary tree, so you need an array of the children elements, like List.
public Node(Object data, List<Node> children) { this.data = data; this.children = children; }
Then create the instances.