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 / hazrat hussain

Formula For BST is
{(2n)!/(n!*n)}/(n+1)
So for
N=1 BST=1
N=2 BST=2
N=3 BST=5
N=4 BST=14
N=5 BST=42
and so on

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about map and their types?

589


What is the logic to reverse the array?

480


What is sequential search?

538


Define the term “percolate down”?

589


What is sorting in data structure?

481






Which is more efficient merge sort vs quicksort?

472


What is arraylist load factor?

516


Explain what are the methods available in storing sequential files ?

491


Define an equivalence relation?

644


Can you please explain the difference between string and an array?

513


Write a Program for Linked list manipulation.

557


What is data in computer science?

511


Can hashmap have duplicate keys?

493


Differentiate between push and pop?

672


What is difference between rb tree and avl tree?

466