Give an analysis of the running time of the following code snippet.
sum = 0 for (i = 0; i < n; i++) for (j = 0; j < n; j++) if (j < i) { for(k = 0; k < j ; k++) ++ sum
The outer loop is simple, it can be represented as $\sum_{i}^{n}$. The first inner loop is also $\sum_{j}^{n}$. The inner-most loop however is confusing to me. It only executes when $j < i$, but I'm not sure how to represent that in a mathematical manner so I can give the $\operatorname{O}(n)$. Does the inner loop execute exponentially?