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 / gurwinder
no.of binary trees=n!*(2^(n)-n)
no.of bst's=n*[2^(n)-n]
if 1,2,3 are key nodes
then:
no. of BST=15
no. of binary trees= 30
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What are trees in data structures?
Is quicksort a stable sorting algorithm?
What is dynamic array with example?
What is modcount in hashmap?
Why do we use collections?
How many types of priority queue are there?
Write an algorithm that counts number of nodes in the circular linked list
How do you sort in ascending order in arraylist?
Does concurrenthashmap allow null?
In what areas do data structures applied?
Write a Program for Linked list manipulation.
What is top in stack?
Which are the sorted collections?
Why is an array homogeneous?
What are the categories of avl rotations?