Let s be a sorted array of n integers. Let t(n) denote the time taken for the…
PYQ GATE 2000
Let s be a sorted array of n integers. Let t(n) denote the time taken for the most efficient algorithm to determined if there are two elements with sum less than 1000 in s. Which of the following statements is true?
- A.
t(n) is O(1)
- B.
n ≤ t(n) ≤ n log₂ n
- C.
n log₂ n ≤ t(n) < (n choose 2)
- D.
t(n) = (n choose 2)
Attempted by 320 students.
Sign up free to check your answer
Sign up freeLoading lesson…

