Answer Posted / r.r.bharti
Simple way:
public int FindDepthOfTree(RBNode n)
{
if (n == null) return 0;
return Math.Max(FindDepthOfTree(n.LeftNode),
FindDepthOfTree(n.RightNode)) + 1;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the 3 pillars of oop?
what are the ways in which a constructors can be called?
What is overloading in oops?
Is oop better than procedural?
Plese get me a perfect C++ program for railway/airway reservation with all details.
Where is pseudocode used?
What is the advantage of oop over procedural language?
2. Give the different notations for the class.\
What is oops and its features?
Is abstract thinking intelligence?
What is use of overloading?
How do you achieve runtime polymorphism?
What is polymorphism and why is it important?
What do you mean by Encapsulation?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.