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


Please Help Members By Posting Answers For Below Questions

Which is better merge sort or quick sort?

474


What happens if we put duplicate key in hashmap?

498


How many types of lists are there?

525


Discuss how to implement queue using stack.

519


Why do we use stacks?

475






What member function places a new node at the end of the linked list?

643


Is heap sort stable?

494


What is the use of sorting the data?

553


What is the use of isEmpty() member methods?

530


What do you mean by tree edge?

533


Define internal nodes?

545


What happens if we try to insert duplicate key in hashmap?

423


Which is the parent class of abstractqueue class?

512


How many types of search algorithms are there?

495


What type of variable is age?

481