Question: song Question 3 What would the following private method do if considered to be within the BinaryTree class private int Unknown(Node node) { if (node

 song Question 3 What would the following private method do if

song Question 3 What would the following private method do if considered to be within the BinaryTree class private int Unknown(Node node) { if (node == null) return 0; if (node.left != null && node.right != null) if (node.left.data.equals (node.right.data)) return 2*p.data+ Unknown(node.left) + Unknown(node.right); else return Unknown(node.left) - Unknown(node.right); else return Unknown(node.left) - Unknown(node.right); } will return number of nodes which have two children. B will return number of nodes for which a node has two children with the same data values. will return the overall summation of the data of the children of nodes that have two children with same da will return the overall summation of the data of the children of nodes that have two children with same da only one value of them is involved in the summation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!