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 / sreekumar

Nubmerof Nodes| BT Possible | BST Possible|
==============+================+==============
1 | 1 | 1
--------------+----------------+---------------
2 | 2 | 2
--------------+----------------+---------------
3 | 6 | 5
--------------+----------------+---------------
4 | 24 | 14
--------------+----------------+--------------
. | . | .
--------------+----------------+--------------
| |
| | 2n 1
| | C * ------
n | n! | n (n+1)
------------------------------------------------------

C=Combinations
n!,2nCn /(n+1)

Is This Answer Correct ?    57 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a circular singly linked list?

978


Tell me why can't constant values be used to define an array's initial size

975


Calculate the address of a random element present in a 2d array, given base address as ba.

1588


What are the 3 types of measurement?

1092


What is meant by strongly connected in a graph?

971


Which sorting is best in time complexity?

1005


State the demerit of linear representation of binary trees?

1025


Why hashmap is faster than hashtable?

1087


Why hashmap is faster than hashset?

1067


Which is the parent class of list class?

959


What is the difference between sorting and classifying?

992


Can we make hashmap synchronized?

988


Why is arraylist not thread safe?

986


What is data structure and why it is important?

1004


What is inplace sorting?

1134