972 views
0 votes
0 votes
Suppose, we have an array of n elements. find the time complexity to search two elements x, y such that:-

a) x+y < 100

b) x+y > 1000

Also, state the algorithm/approach for the same.

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
Akriti sood asked Jan 23, 2017
1,310 views
What is the time complexity of the following function foo() void foo() { int i, j; for(i = 1; i <= n ; i++) for(j = i; j <= log(i); j++) printf(“gate”); } what is the...
2 votes
2 votes
1 answer
2
1 votes
1 votes
0 answers
3
1 votes
1 votes
2 answers
4
sh!va asked Dec 4, 2016
997 views
for (int i = 1; i <=m; i += c){ -do something -}for (int i = 1; i <=n; i += c){ -do something - }What will the the tiem complexity of given code pseudococde?A. O (m...