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

Which sorting is best?

859


What is a static structure?

895


What is the difference between data type and data structure?

840


What are the types of bulleted list?

798


How can someone display singly linked list from first to last?

826


Which are the sorted collections?

910


Which is the parent class of abstractqueue class?

893


Which is the parent class of enumset class?

921


What is the limit of arraylist?

892


How can we remove loops in a linked list? What are the functions of fast and slow pointers?

1123


Should I use hashmap or hashtable?

859


What is hashing technique? Describe in brief.

974


Is vector synchronized?

883


What is collision in data structure?

898


Does treemap preserve order?

810