Q#1: An algorithm is made up of 2 modules M1 and M2.If
order of M1 is F(n) and order of M2 is g (n) then what is
the order of the algorithm.
Q # 2 : How many binary trees are possible with 3 nodes?
with 4 nodes?
Answer Posted / sriram
iam sorry i had given the wrong answer above....
its O(f(n)*g(n)) or O(max(f(n),g(n))
2^n -n so its 5 and 12 nodes respectively.....
| Is This Answer Correct ? | 34 Yes | 3 No |
Post New Answer View All Answers
What will be the output of below code?
Are the expressions arr and &arr same for an array of integers?
Explain what is B-tree?
What are hash tables good for?
How do I rearrange rows in numbers?
What is the Difference between treemap and hashmap?
Is hashmap part of collection?
Which interfaces are implemented by linkedhashset?
What is difference between for loop and foreach?
Parenthesis is never required in postfix or prefix expressions, why?
Is red black tree balanced?
What data structure does a binary tree degenerate?
What is the height of a binary tree?
Is priority queue sorted?
Write the algorithm for converting infix expression to postfix expression?