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

for binary search tree, no of trees, (2^n)-n... here 8-3=5
trees... u can draw n see...

for binary tree, no of trees n(2^n)-n here 3*5=15...
replace node in each bst with other two values and see....

Is This Answer Correct ?    72 Yes 48 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a hashset contain duplicates?

480


What are binary search and fibonacci search?

506


Are hash tables ordered?

472


Why is hashing used?

458


Can treeset contain null?

495






What is the difference between hashset and treeset?

507


What is heap and its types?

492


What is a dequeue?

541


Define a set?

559


What is complete binary tree in data structure?

515


What is the difference between an array and vector?

517


Explain implementation of traversal of a binary tree.

578


What is homogeneous array?

460


Why is tuple immutable?

446


Why do we use insertion sort?

479