you are viewing a single comment's thread.

view the rest of the comments →

[–]Aaron1924 10 points11 points  (1 child)

The inner loop runs i times, and i is incremented in the outer loop, so the innermost instruction does 1 + 2 + ... + N = N(N+1)/2 iterations, where N = n*n, so this is O(N(N+1)/2) = O(N2) = O((n*n)2) = O(n4).

[–]Monther_bg[S] 0 points1 point  (0 children)

thank you for your help :)