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
order of the algorithm is f(n)+g(n)
no of binary trees possible with n nodes is 2^n-n
3->2^3-3=5 nodes
4->2^4-4=12 nodes
| Is This Answer Correct ? | 4 Yes | 15 No |
Post New Answer View All Answers
What is meant by arraylist?
What are hashmaps good for?
What stack means?
What is the idea behind splaying?
What is the need for extendible hashing?
What is application of data structure?
What is dynamic array how is it created?
Tell me what should be done in the base case for this recursive problem?
Is heap sort stable?
What is data in computer science?
How to initialize Dictionary using collection initialize?
What is the application of queue?
What are some of the best practices relating to the java collection framework?
What is sort in data structure?
Why is hashset not ordered?