Solved

Assuming a Node Class

Question 8

Essay

Assuming a Node class
class Node
{
int element;
Node left,right;
Node(int el,Node left,Node right){
element = el;
this.left = left;
this.right = right;
}
}
Write a method int size(Node tree)that returns the number of nodes in the binary tree whose root is tree.

Correct Answer:

verifed

Verified

int size(Node tree)
{
if (tree...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions