Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2015 (Mock Test) | Question 10

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

Given an array that represents elements of arithmetic progression in order. It is also given that one element is missing in the progression, the worst case time complexity to find the missing element efficiently is:
(A) Θ(n)
(B) Θ(nLogn)
(C) Θ(Logn)
(D) Θ(1)


Answer: (C)

Explanation: We can use Binary Search to find the missing element. See following link for details.

https://www.geeksforgeeks.org/find-missing-number-arithmetic-progression/


Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!