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

Does linked list allow null values?

808


Program to remove duplicate elements in an array.

1015


What are the advantages of linked list?

810


What do you mean by 2-3-4 tree?

982


Tell me what should be done in the base case for this recursive problem?

879


If we try to add duplicate key to the hashmap, what will happen?

857


Why is arraylist used?

944


Explain binary tree traversals?

913


What is a bubble sort and how do you perform it?

1010


Can you declare an array without assigning the size of an array?

1081


what is the primary advantage of a linked list?

1341


What do you mean by linear probing?

1047


Can map contain duplicate keys?

834


Explain what are the major data structures used in the network data model?

1064


Give one example of right rotation.

923