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...

How many different binary trees and binary search trees can
be made from three nodes that contain the key values 1, 2 & 3?

Answer Posted / shweta

for no. of different binary tree---
for n nodes the formula is 2^n-n in this formula value of
nodes are not considered, only the way nodes can be present
in a tree so for 3 nodes there can be 5 ways, for each way
no. of possibilty of values is 3! so answer comes out to be
5*6=30

1 1 1 1 1
A A A A A
2 3 2 2 2 2

A A A A
3 3 3 3

for binary search tree answer is 3

Is This Answer Correct ?    19 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain recursive function & what is the data structures used to perform recursion?

986


Can you please explain the difference between array_name and &array_name?

944


Which is the parent class of deque class?

884


How do we search a specific element in an array?

899


What is heap tree explain with example?

911


What is hashing in cyber security?

850


Differentiate linear from a nonlinear data structure?

1001


What is doubly linked list in data structure?

776


Explain about circular linked list?

869


In what order the elements of a hashset are retrieved?

907


What is bubble sort?

846


How does dynamic memory allocation help in managing data?

1467


Difference between arrays and linked list?

894


Which sorting technique is best in worst case?

841


How do I sort hashset?

863