...
STQC-NIELIT SC-B 2021
November 1, 2024
Algorithm-Paradigms
November 2, 2024
STQC-NIELIT SC-B 2021
November 1, 2024
Algorithm-Paradigms
November 2, 2024

Algorithms

Question 264
Given an integer array of size N, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is
A
both Ο(N) and Ω(N)

B
Ο(N) but not Ω(N)
C
Ω(N) but not Ο(N)
D
neither Ο(N) nor Ω(N)
Correct Answer: A
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!