Question: Find-out the complexity a). s = 0; for (i = 1; i < n-1; i++) S = S + 1; b). s = 0;

Find-out the complexity a). [ begin{array}{l} s=0 ;  text { for }(i=1 ; i<n-1 ; i++)  s=s+1 ; end{array} ] b). [ b

Find-out the complexity a). s = 0; for (i = 1; i < n-1; i++) S = S + 1; b). s = 0; for (i = n-5; i > 4; i--) S = S + i; c). s = 0; for (i = 1; i

Step by Step Solution

3.40 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a If we breakdown the given code step by step in the first step s is initialized to 0 which takes on... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!