Problem #118
Analyzing Complexity
Problems with which we often deals in programming requires us to approximate number of iterations that we are going to perform in loops.
Given below is a simple pseudo code for which you need to tell the number of iteration performed in the given nested list :
for ( int x1 = 1 ; x1 <= n ; x1++ )
for ( int x2 = x1 ; x2 <= n ; x2++ )
for ( int x3 = x2 ; x3 <= n ; x3++ )
……
……
……
for ( int xm = x(m-1) ; xm <= n ; xm++ )
it++ ;
Take initial value of it as 0 and value of m and n to be 25 and 26 respectively.