0 0 votes Algorithms testbook-test-series algorithms time-complexity + – Tushar Shinde 711 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
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. Deepesh Kataria answered Jan 18, 2016 • selected Jan 18, 2016 by Tushar Shinde Deepesh Kataria comment Share Follow See 1 comment 1 1 comment reply Tushar Shinde commented Jan 18, 2016 reply Follow flag Ohh.. I mistook it for i, j , k :D Then the answer would have been n^12 , right? 0 0 replyShare Please log in or register to add a comment.
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 Aboveallplayer answered Jan 18, 2016 Aboveallplayer comment Share Follow 0 reply Please log in or register to add a comment.