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 type of questions
What is object in oop?
How many human genes are polymorphic?
What is abstract class in oops?
Can private class be inherited?
program for insertion ,deletion,sorting in double link list
What is the full form of oops?
What is abstraction in oop with example?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Write a program to sort the number with different sorts in one program ??
What is a class and object?
What does sksksk mean in text slang?
Why is polymorphism needed?
which feature are not hold visual basic of oop?
What is the point of oop?