• edited by
711 views

2 Answers

Best answer
1 1 vote
FIRST LOOP:intializes i=1 SECOND LOOP:intializes i=1; THIRD LOOP intializes i=1 and run till i=n^6 .. and when i checks for second iteration for 1st loop get.. condition failed ..and loops out ... THATS WHY ONLY n^6 times it get printed.
• selected by
1 1 vote
HERE N^6 IS THE ANSWER BECAUSE  every time variable i is initialized to 1 and so the previous 2 i values are ignored and the final loop is taken in consideration. this is what i think
Position:
Show:

Related questions

0 0 votes
1 1 answer
737
737 views
rajan asked Dec 9, 2016
737 views
how to solve these two using matser thorem.1. t(n)=2t(√n)+n2. t(n)=4t(√n)+(logn)^2
1 1 vote
2 answers 2 answers
2.9k
2.9k views
vijaycs asked Jul 11, 2016
2,911 views
On which of the following recurrence relation Masters theorem can not be applied ?A. T(n)= 2T(n/2) + n (log n).B. T(n) = T(n/2) + 1.C. T(n) = 8T(n/2) + (log n).D. T(n) = ...
0 0 votes
0 0 answers
773
773 views
2 2 votes
1 answers 1 answer
2.0k
2.0k views
Akriti sood asked Jan 23, 2017
1,960 views
please tell the time complexity?i was getting O(2n)