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

Which interface provides the capability to store objects using a key-value pair?

580


Why is sorting necessary?

482


Why do we use hashset?

478


How do you search for a target key in a linked list?

757


What is quick sort?

632






What are the different types of data structures explain briefly?

539


What is binary tree? Explain its uses.

508


What is bubble sort?

525


Explain the common uses of threaded binary tree.

601


Define dynamic data structures?

554


Define terminal nodes in a tree?

560


Why do we use different types of data structures?

475


Does treemap allow null values?

472


What are the tasks performed during preorder traversal?

625


What are the disadvantages of circular list?

501