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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array. The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).

548


What is peek in stack?

451


What is the time complexity of hashmap get () and put () method?

464


what is the biggest advantage of linked lists?

562


What are different types of sorting techniques?

516






How do you do a heap sort?

481


What is the difference between collections class vs collections interface?

535


Does linked list allow null values?

468


How many types of arrays are there?

520


How to find middle element of linked list in one pass?

535


Is it possible to make an array volatile in java?

509


Differentiate between comparable and comparator.

637


What is the complexity of adding an element to the heap?

488


Which is faster arraylist or linked list?

490


What is the easiest sorting method to use in data structures?

559