Hey guys/gals i need some help with finding the T(n) complexity of the following for nested loops
sum = 0
for i = 0 to n-1 do
[INDENT]for j = 0 to (i^2) - 1 do[/INDENT]
[INDENT][INDENT]for k = 0 to j - 1[/INDENT][/INDENT]
[INDENT][INDENT][INDENT]sum = sum + 1[/INDENT][/INDENT][/INDENT]
[INDENT][INDENT]end-for[/INDENT][/INDENT]
[INDENT]end-for[/INDENT]
end-for
write sum
I am confused as to how to analyze this. Any suggestion? I do know that you start with innermost loop but what do i do upper bound minus lower bound plus 1?