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


Please Help Members By Posting Answers For Below Questions

Why heap sort is not used?

697


Explain pre-order and in-order tree traversal.

761


What is time complexity of sorting algorithms?

725


What is the order of selection sort?

636


Which sorting algorithm has minimum number of swaps?

683


What is a hash in programming?

711


Does list maintain insertion order?

702


What do you mean by overflow and underflow?

717


What is non linear structure?

702


What is significance of ” * ” ?

822


Is complete binary tree?

676


Is a list an array?

643


Why quicksort is faster?

675


We know that Arrays are objects so why cannot we write strArray.length()?

1383


Can hashset contain duplicates?

702