Back to the 2024 paper

Module 2: Divide and Conquer Paradigm and Heaps

20242m

The minimum number of comparisons required to determine if an integer appears more than n/2n/2 times in a sorted array of nn integers is

  • (i) O(n)O(n)
  • (ii) O(logn)O(\log n)
  • (iii) O(nlogn)O(n \log n)
  • (iv) O(1)O(1)

Similar questions