Computer Science EngineeringHardISRO SC (CS)
How many structurally distinct binary trees (left and right children distinguished) with exactly 6 nodes have height exactly 4 edges?
- A. 58
- B. 56
- C. 55
- D. 112
Correct answer: B. 56
Count with the recurrence over left-subtree sizes, then take (height <= 4) minus (height <= 3): 56.
Practise more Algorithms, Data Structures & Programming (ISRO CS) questionsAlgorithms, Data Structures & Programming (ISRO CS): notes and key points
More Algorithms, Data Structures & Programming (ISRO CS) questions
- Using the Master theorem (extended form), the solution of T(n) = 2T(n/4) + n is:
- The keys [10, 14, 40, 49, 41, 19, 38] are inserted in this order into an initially empty AVL tree. Its preorder traversal is:
- A connected simple undirected graph has 8 vertices and 12 edges. The minimum number of edges that must be removed to obtain a spanning…
- A connected simple undirected graph has 10 vertices and 17 edges. The minimum number of edges that must be removed to obtain a spanning…
- The worst-case number of key comparisons binary search makes on a sorted array of 7 elements (counting one three-way comparison per probe)…
- The postfix expression 3 3 2 + 6 1 evaluates to: