big o - C++ - Big-O Notation -


for reason im unable solve this. big-o notation

for (int = 0; < n; i++)     (int j = 0; j < n; j++) {         c[i][j] = 0;         (int k = 0; k < n; k++)             c[i][j] += a[i][k] * b[k][j];     } 

for (int = 0; < n; i++)  (int j = 0; j < n; j++) {   c[i][j] = 0;   (int k = 0; k < n; k++) c[i][j] += a[i][k] * b[k][j];  } 

it looks it's o(n^3) because has 3-level loops.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -