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
Write a Program for Delete an element from a doubly linked list.
What are doubly linked lists?
What is default array size?
How does arraylist size work?
How does a dynamic array work?
What is the need for path compression?
Can you use Bubble Sort To sort the number of elements.
List the applications of stacks?
How does selection sort work?
Does arraylist contain duplicates?
Does linkedhashset allow null values?
Which sorting is best?
List some applications of tree-data structure?
Does hashset maintain order?
Is any implicit arguments are passed to a function when it is called?