Big-O of nested loop
An outer loop runs from to ; an inner loop runs from to . For , how many inner-loop iterations execute in total?
Show hints (2)+
- The inner count grows with $i$.
- $\sum_{i=1}^{n} i = n(n+1)/2$.
Answer
Reveal answer →Final answer
55
Want the full step-by-step worked solution? It's part of Premium — along with a worked solution for every question in the bank.