1 votes 1 votes The complexity of this program? int fun1 (int n) { int i, j, k, p, q = 0; for (i = 1; i < n; ++i) { p = 0; for (j = n; j > 1; j = j/2) { p++; for (k = 1; k < p; k = k * 2) ++q; } } return q; } Ajit J asked Dec 30, 2018 Ajit J 455 views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments Ajit J commented Dec 30, 2018 reply Follow Share I have no idea what the answer is 0 votes 0 votes Shaik Masthan commented Dec 30, 2018 reply Follow Share @Ajit J it may help you to solve this, i know it is not exact answer for your question. 3 votes 3 votes Shamim Ahmed commented Dec 30, 2018 reply Follow Share @Shaik Masthan Bhai thanks a ton! The answer would be O(n lgn) ? 0 votes 0 votes Please log in or register to add a comment.