Consider an array π΄ of integers of size π. The indices of π΄ run from 1 toβ¦
PYQ GATE 2026
Consider an array π΄ of integers of size π. The indices of π΄ run from 1 to π. An algorithm is to be designed to check whether π΄ satisfies the condition given below
βπ,π β {1, β¦ , π β 1} such that π > π, (π΄[π + 1] β π΄[π]) > (π΄[π + 1] β π΄[π])
Which one of the following gives the worst case time complexity of the fastest algorithm that can be designed for the problem?
- A.
Ξ(n)
- B.
Ξ(logβ‘n)
- C.
Ξ(nlogβ‘n)
- D.
Ξ(n2)
Attempted by 301 students.
Sign up free to check your answer
Sign up freeLoading lessonβ¦

