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

When would you use a hashmap?

641


State the advantages of using infix notations?

895


Can hashmap have same key?

665


Describe tree database.

687


Is radix sort faster than quicksort?

680


What are control structures?

717


Can a null element added to a treeset or hashset?

647


Can treeset contain duplicates?

741


Why is an array homogeneous?

637


What is difference between array and string?

724


Why linked list is required?

622


Which is better hashset or treeset?

718


What is the heap in data structures?

735


What is the best case for bubble sort?

659


What are the disadvantages of linked list over array?

670