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
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 |
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 |
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 |
For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX.
Define tree edge?
Evaluate the following prefix expression " ++ 26 + - 1324"
24 Answers College School Exams Tests, Patni,
What does bubble sort do?
Can hashmap have same key?
Explain the types of linked lists.
Is array a dynamic data structure?
Differentiate stack from array?
What's difference between stack and queue?
How do I use quick sort?
List some applications of tree-data structure?
How are elements stored in hashset?