• retagged by
688 views
0 0 votes

An array with n distinct element In array till ith position elements are in increasing order after ith position elements are in decreasing order time Complexity to find i

A.O(nlogn)

B.O(logn)

C.O(n)

D.O(loglogn)

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
1 1 answer
3.0k
3.0k views
mahakp asked Jan 5, 2018
3,030 views
Q1. Consider the methods used by process P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared Boolean variables, ...
2 2 votes
1 1 answer
785
785 views
Aman Koli asked Dec 23, 2024
785 views
int main(){ int c = 0; for(int i = 1; i < n : i++){ for(int j = i + 1; j <= n; j++){ for(int k = 1; k <= j; k++){ c = c + 1; } } } return 0; }What will be the itme comple...
0 0 votes
1 1 answer
1.4k
1.4k views
aashish1406 asked Aug 9, 2023
1,440 views
Suppose we have a directed graph G = (V,E) with V= {1, 2, ..., n} and Eis presented as an adjacency list. For each vertex u in V, out(u) is a list such that (u, v) in {1,...
0 0 votes
1 answers 1 answer
1.1k
1.1k views
aashish1406 asked Aug 9, 2023
1,060 views
How many times is the comparison $i >= n$ performed in the following program?int i = 200 n = 80; main() { while (i >= n) { i = i - 2 n = n + 1 } }