Algorithm Analysis questions

Q20

GATE CS 2025 CS-1Algorithm AnalysisMCQ1 mark−1/3 if wrong
Consider the following recurrence relation:
T(n)=2T(n−1)+n2nT(n) = 2T(n - 1) + n2^n for n>0n > 0, T(0)=1T(0) = 1.
Which ONE of the options is CORRECT?
Show answer without attempting

Answer: A

Q41

GATE CS 2025 CS-2Algorithm AnalysisMCQ2 marks−2/3 if wrong
An array AA of length nn with distinct elements is said to be bitonic if there is an index 1≤i≤n1 \le i \le n such that A[1…i]A[1 \dots i] is sorted in the non-decreasing order and A[i+1…n]A[i+1 \dots n] is sorted in the non-increasing order.

Which ONE of the following represents the best possible asymptotic bound for the worst-case number of comparisons by an algorithm that searches for an element in a bitonic array AA?
Show answer without attempting

Answer: D

0/20 correct0 marks

Related topics in Algorithms