Expand|Select|Wrap|Line Numbers
- for ( j=0; j < n; j++ )
- {
- for ( k=0; k <= j; k++ )
- A[j] = A[j] + C[k]*B[j];
- }
so what exactly is the bigO for that code block? the outer loop runs N times. The inner loop runs J + 1 times, right? Since k = 0 and k <= to J, not < J.
then, J runs N times. So would it be something like N*N+1? I'm totally confused. any help would be much appreciated!