UGC NET Paper 2 (Computer Science)Very hard
For T(n) = T(n/2) + T(n/4) + n, the asymptotic solution is:
- A. Theta(n)
- B. Theta(n log n)
- C. Theta(n^2)
- D. Theta(n^(3/4))
Correct answer: A. Theta(n)
Per-level work shrinks by the factor 3/4 < 1, so the geometric series is dominated by the root: Theta(n).
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- The number of structurally distinct binary trees with 5 nodes is:
- The information-theoretic lower bound on the number of comparisons needed to sort 5 distinct elements is:
- Consider. I. Kruskal's algorithm runs in O(E log E) with sorting. II. Prim's algorithm with a binary heap runs in O(E log V). III…
- Matrices A (10x20), B (20x30), C (30x40) are to be multiplied. The minimum number of scalar multiplications is:
- For symbol frequencies 5, 9, 12, 13, 16, 45 a Huffman code has a total weighted path length (encoded bits) of:
- A full binary tree (each node has 0 or 2 children) has 25 leaves. The total number of nodes is: