retagged by
676 views
0 votes
0 votes
What is the time & space complexity of this algorithm?

Main()

{

           for(i=n; i>10; i=i^1/4)

         {

                       for(j=201; j<n^3; j=j+400)

                    {     

                             for(k=47; k<=n^84; k=k*108)

                              {

                                             k=k^61;

                              }

                  }

      }

}
retagged by

3 Answers

1 votes
1 votes

Ans

0 votes
0 votes

I m getting

time complexity = O(n^3*logn*loglogn)

and

space complexity = O(1)

0 votes
0 votes

This is my approach!

EDIT: 

This answer has mistakes :(

edited by

Related questions

0 votes
0 votes
3 answers
1
Phlegmatic asked Jun 8, 2018
494 views
int main() { int i; for(i=1;i<=n;i++) f(i); } void f(int n) { int A[n]; int j; for(j=1;j<=n;j++) cout<<j; }What will be the time and space complexity of the following cod...