Computer Sciences > Gate 2024 Set-1 > TCP IP
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 Ο(𝑁) and Ω(𝑁)
B
Ο(𝑁) but not Ω(𝑁)
C
Ω(𝑁) but not Ο(𝑁)
D
neither Ο(𝑁) nor Ω(𝑁)

Correct : a

Similar Questions

In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that?
#73 MCQ
A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage...
#831 MCQ
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......