Articles by Team EasyExamNotes

Find the time complexity of sum of two matrices

What is the time complexity of the program for the sum of two matrices? Step count method void sum() { int n, a[n][n],b[n][n],c[n][n],i,j; //—-0  for(i=0;i<n;i++) //—-n+1   {      for(j=0;j<n;j++) //—-n+1       {         c[i][j]=a[i][j]+b[i][j]; //—-n  … Read more