retagged by
690 views
1 votes
1 votes

Can anyone explain me the answer in detail?

retagged by

1 Answer

0 votes
0 votes
The answer is O(n) as we just need to run one loop and check for condition x+y>100 condition.There is no need to sort the array we just need to meet the x+y>100 condition.Option A is correct.Please correct me if I am wrong.

Related questions

0 votes
0 votes
0 answers
1
Neelu Lalchandani asked Nov 2, 2022
325 views
Time Complexity in C will be O(n) right? and big omega (n) is also big omega (n^2), then why is c incorrect?
1 votes
1 votes
2 answers
2
akankshadewangan24 asked Sep 20, 2018
843 views
If t(n) and s(n) denotes the time and space complexity of an algorithm with input size n element then which one of the following is always true?S(n)=O(t(n)) correct H...
1 votes
1 votes
1 answer
3
0 votes
0 votes
3 answers
4
Subham Nagar asked Mar 20, 2018
1,185 views
An array $'A'$ has $n$ distinct integers. What is the tightest time complexity to check $A[i]=i$ for some $i$. Consider all elements of array within range from $1$ to $n$...