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


Please Help Members By Posting Answers For Below Questions

What is the difference between length () and size () of arraylist?

445


How do you sort in ascending order in arraylist?

495


What is structured data with example?

476


Define linked list data structure.

571


You are given a singly linked list. How would you find out if it contains a loop or not without using temporary space?

685






What is a property class?

506


What are hash tables good for?

465


What is an example of an algorithm?

480


Check if duplicates exist in an array of N which has range 1 to N.

542


Which sorting algorithms are in place?

485


What do you mean by secondary clustering?

528


What is map keyset?

462


What do you mean by level of the tree?

567


Is array a collection?

485


What are the 3 types of measurement?

538