I have some difficulties performing the worst case analysis on this algorithm.
The outermost loop is executed $2N$ times.
The while loop, in the worst case, will increase by $2$ each time, so it performs $i/2$ basic operations ($*2$ because double call)
for (i=1; i<=2*N; i++) {
j = 0;
while (j <= i) {
a[i] = function (function (a[i]));
if (c[i][j] != 0)
j = j + 6;
else
j = j + 2;
}
}
function
is the basic operation.
Am I going the right way?