> So the sigma is because of the sum over j?
Use the right words. Sigma is just a denotation of summ operator.
Roughly speaking, yes.
> And if we have another loop instead of 'while' for example a 'for'
> loop again, we would have the same thing again? I mean any loop inside
> of the first loop will be like the way you describe it and cause a
> sigma because of the iteration of 'j'?
it's not important whether it's while or for loop. What is important
is
that if # steps of inner loop steps depends on specific iteration of
outer loop. That's what makes things little hadrer.
Sometimes walking through an algorithm with specified input does
help.