84 views

Hello anyone can help me to find big O for this algorithm please....

f=1;

x=3;

for (int i = 1; i <= n; i*=2)
   for (int j = 1; j <= i * i; j++)
      if (i % j == 0)
      for (int k = 1; k <= j; k++)
         f=f*x;

| 84 views
0
Is ans O(n)?

O(n^2)

by (275 points)

O(n4)

by Active (1.1k points)

2