Hey guys,
I'm doing some exercises for Algorithms Complexity and thing is I'm stuck.
I can't find to understand what this is supposed to do :
Any idea ?Code:s = sum(K=0 ... N-1) a[k]
Thanks.
Printable View
Hey guys,
I'm doing some exercises for Algorithms Complexity and thing is I'm stuck.
I can't find to understand what this is supposed to do :
Any idea ?Code:s = sum(K=0 ... N-1) a[k]
Thanks.
It looks like an attempt to render summation notation, i.e., sum of a[k] from k=0 to k=n-1. Translating it to C would likely involve a for loop.
It it inside a while loop :o
Ah well, it amounts to the same thing, though I still think that a for loop would be more idiomatic when converting from summation notation.