previous | start | next

Example 5

Assume N is a power of 2; e.g., N = 2k

    for(int i = 1; i < N; i *= 2) {
      for(int j = 0; j < N; j++) {
        sum++;
      }
    }
 
   


previous | start | next