Complete the code to create a new node with value 10.
TreeNode root = new TreeNode([1]);The constructor needs an integer value. 10 is correct.
Complete the code to assign a left child node with value 5 to the root.
root.[1] = new TreeNode(5);
The left child of a binary tree node is assigned to the 'left' field.
Fix the error in the code to assign a right child node with value 15 to the root.
root.[1] = new TreeNode(15);
The correct field name for the right child is 'right' (all lowercase).
Fill both blanks to create a left child with value 3 and a right child with value 7 for the left node.
root.left.[1] = new TreeNode(3); root.left.[2] = new TreeNode(7);
The left child is assigned to 'left' and the right child to 'right'.
Fill all three blanks to create a right child with value 20 for the right node, and a right child with value 25 for that right child.
root.right.[1] = new TreeNode(20); root.right.[2].[3] = new TreeNode(25);
The right child of root.right is assigned to 'right'. Then its right child is assigned to 'right' again.
