0 votes 0 votes Can someone prove this? Algorithms made-easy-test-series algorithms time-complexity + – Kai asked Dec 19, 2016 • edited Mar 4, 2019 by akash.dinkar12 Kai 336 views answer comment Share Follow See 1 comment See all 1 1 comment reply Prabhanjan_1 commented Dec 20, 2016 reply Follow Share i : 1 2 3 4 5 6 .... j : {1} {1234} {123456789} ........ out of which exactly i elements satisfy % condition For i=2 and j={1234}, 2 elements satisfy the condition. for j=2 , k loop runs 2 times , for j=4 ,k loop runs 4 times , For j=n, k loop runs n times but out of $n^2$ elements of j we extracted n =>O($n^3$). So,outer loop runs n times =>Total = O($n^4$). 1 votes 1 votes Please log in or register to add a comment.