Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to get the binary tree.

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


Please Help Members By Posting Answers For Below Questions

What are the 3 pillars of oop?

1245


what are the ways in which a constructors can be called?

2201


What is overloading in oops?

1212


Is oop better than procedural?

1088


Plese get me a perfect C++ program for railway/airway reservation with all details.

3954


Where is pseudocode used?

1167


What is the advantage of oop over procedural language?

1129


2. Give the different notations for the class.\

2223


What is oops and its features?

1150


Is abstract thinking intelligence?

1109


What is use of overloading?

1188


How do you achieve runtime polymorphism?

1097


What is polymorphism and why is it important?

1099


What do you mean by Encapsulation?

1137


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.

2013