retagged by
248 views
3 votes
3 votes
what is time complexity   :  for( i= 1;   i < n/22  ; ++i )       can i take  n/22 = n   

for( i= 0 ; i < n/4 - 1  ; ++i )     can i take n/4 - 1  =   n   

will it affect my answer ?

because we interseted in  upperbound  that is n  ??
retagged by

1 Answer

Related questions

0 votes
0 votes
1 answer
1
LavTheRawkstar asked Jan 12, 2017
833 views
INSERTION-SORT (A, n) ⊳ A[1 . . n]for (j ← 2 to len(A) ){key ← A[ j];i ← j – 1 ; while (i 0 and A[i] key) { A[...
1 votes
1 votes
0 answers
2
2 votes
2 votes
1 answer
3
nishant279 asked Jul 1, 2018
2,233 views
What is the time Complexity of 2T(n/2) + nlogn? Can we apply Master's Theorem?
0 votes
0 votes
0 answers
4
radha gogia asked Jun 17, 2018
1,284 views
Successful Search we assume that the probability of searching or finding an element at each location is same , then if we have n elements so probability is $1/n$...Also w...