retagged by
776 views
0 votes
0 votes
What is the time complexity?

int i,j,k,x=0;

for(i=1;i<=n;i++)

for(j=1;j<=i*i;j++)

{

if (j mod i ==0)

for(k=1;k<=j;k++)

x=x+10;

}
retagged by

1 Answer

Best answer
8 votes
8 votes

$O(n^4)$ 

 

selected by

Related questions

1 votes
1 votes
1 answer
1
phaneendrababu asked Sep 20, 2018
690 views
Can anyone explain me the answer in detail?
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$...