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
Why is polymorphism important in oop?
What is overloading and its types?
State what is encapsulation and friend function?
What is oops with example?
What is interface in oop?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
how to get the oracle certification? send me the answer
Write a program to sort the number with different sorts in one program ??
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
Which is not an object oriented programming language?
What is polymorphism give a real life example?
Can a destructor be called directly?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is polymorphism and example?