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?

Answers were Sorted based on User's Feedback



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..

Answer / 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

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..

Answer / mukta majumder

O(max(f(n),g(n))

Is This Answer Correct ?    14 Yes 1 No

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..

Answer / mousumi

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 ?    2 Yes 4 No

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..

Answer / 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

More Data Structures Interview Questions

Define a binary search tree?

0 Answers  


What are the different types of sorting? Explain the difference between them.

0 Answers   TCS,


What are the two types of data?

0 Answers  


What exactly is data?

0 Answers  


Describe full binary tree and complete binary tree.

0 Answers  






What is indexing an array?

0 Answers  


What is an example of an algorithm?

0 Answers  


How do I rearrange rows in numbers?

0 Answers  


Is hashset thread safe?

0 Answers  


What are the benefits of using arrays?

0 Answers  


Explain what are the types of collision resolution techniques and the methods used in each of the type?

0 Answers  


Write the advantage of separate chaining?

0 Answers  


Categories