Created
May 28, 2018 12:51
-
-
Save clara-shin/549af662902631d8fc541bf496f490c1 to your computer and use it in GitHub Desktop.
시간복잡도 구하기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first | |
i = 1; // 1 | |
while (i <= n) { // n + 1 | |
x = x + 1; // 1 | |
i = i + 1; // 1 | |
} | |
// second | |
int i, j; | |
for(i=1; i <= n; i++) // n | |
for(j=i; j <= n; j++) // n | |
if(j < i) | |
C[i,j] = A[i] * B[j]; | |
// 이중반복이므로 n * n = n^2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment