How many different binary trees and binary search trees can
be made from three nodes that contain the key values 1, 2 & 3?
Answers were Sorted based on User's Feedback
Answer / kalai
If the element is a root node ,in a 1st search it will find
the element. If the element is either a lchild or rchild it
make 2 searches.
| Is This Answer Correct ? | 2 Yes | 7 No |
Answer / bragaadeesh
Not a direct answer. But you can find in depth concepts
about binary and binary search tree in this page.
http://technicalypto.blogspot.com/search?
q=binary+search+tree
| Is This Answer Correct ? | 1 Yes | 6 No |
Answer / shweta
for no. of different binary tree---
for n nodes the formula is 2^n-n in this formula value of
nodes are not considered, only the way nodes can be present
in a tree so for 3 nodes there can be 5 ways, for each way
no. of possibilty of values is 3! so answer comes out to be
5*6=30
1 1 1 1 1
A A A A A
2 3 2 2 2 2
A A A A
3 3 3 3
for binary search tree answer is 3
| Is This Answer Correct ? | 19 Yes | 42 No |
Answer / kanha
for binary tree answer is n! ways that is 3!=6
For Binary search tree n ways..that is 3
| Is This Answer Correct ? | 17 Yes | 52 No |
Explain data structure
How do you do a selection sort?
Can an arraylist be null?
What is the difference between set and unordered_set?
Which method will arrange the element of an array in alphabetical order?
Define a priority queue?
Evaluate the following prefix expression " ++ 26 + - 1324"
24 Answers College School Exams Tests, Patni,
How does hashset work internally in java?
What is raid (redundant array of inexpensive disks)? Explain its level?
In which matrix, we can use multilinked structures?
How do you sort in ascending order in arraylist?
Which algorithm is used in collections sort method?