I have some code snippets in which I have to find the run time using big O notation.

code frag 1:

Code:void E(int array[], int N){ int i, j; for(i=1; i<N-5; i++){ for (j=i; j<i+5; j++) array[i] +=array[j]; array[i] = array[i]/5; } }

I understand the simpler ones such as O(N) and O(N^2), but this seems to be slightly more complex.

could someone explain how we would arrive at an answer for this?