1 votes 1 votes Algorithms algorithms time-complexity test-series + – Çșȇ ʛấẗẻ asked Aug 28, 2016 • retagged Jul 17, 2022 by makhdoom ghaya Çșȇ ʛấẗẻ 354 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 0 votes 0 votes Outer "i" loop is running 100 times which is constant For each of the value of "i" inner "j" loop runs n times "k" loop runs "j" times which inetern runs n times Therefore the total complexity is O(n^2) Prajwal Bhat answered Aug 28, 2016 • edited Nov 28, 2016 by Prajwal Bhat Prajwal Bhat comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes You can simply replace j with n u will get two loops to n so O(n^2) Pavan Kumar Munnam answered Aug 28, 2016 Pavan Kumar Munnam comment Share Follow See all 0 reply Please log in or register to add a comment.