times (note that an extra step is required to terminate the for loop, hence n + 1 and not n executions), which will consume "T"4( "n" + 1 ) time. The inner loop, on the other hand, is governed by the value of j, which iterates from 1 to "i". On the first pass through the outer loop, j iterates from 1 to 1: The inner loop makes one pass, so running the inner loop body (step 6) consumes "T"6 time, and the inner loop test (step 5) consumes 2"T"5 time. During the next pass through the outer loop, j iterates from 1 to 2: the inner loop makes two passes, so running the inner loop body (step 6) consumes 2"T"6 time, and the inner loop test (step 5) consumes 3"T"5 time.