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 / shweta
for binary tree ans is 5, the general formula is (2^n)-n
for binary search tree no. of tree possible is 3.
as root data can be either 1, 2 or 3
| Is This Answer Correct ? | 39 Yes | 38 No |
Post New Answer View All Answers
What are some of the best practices relating to the java collection framework?
Define red-black trees.
Can a binary tree be empty?
Which interface provides the capability to store objects using a key-value pair?
Can array store heterogeneous data?
What is best time complexity?
Explain implementation of traversal of a binary tree.
What are arrays give example?
What is a pseudocode example?
Give a basic algorithm for searching a binary search tree?
What is the structure of an array?
Can I provide array size dynamically?
Which is more efficient merge sort vs quicksort?
Define parent node?
Is treeset thread safe?