The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
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;

in Algorithms by (7 points) | 84 views
0
Is ans O(n)?

2 Answers

0 votes

O(n^2)

by (275 points)
0 votes

O(n4)

by Active (1.1k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,781 questions
53,593 answers
185,825 comments
70,880 users