Sum it up is poorly defined Given the wording of the "sum it up" problem, the numbers could be given in an array -- or by any other means. Given the memory constraint aspect of the problem, I believe this problem would be more valuable to the reader if it was clarified that the numbers are presented in some way where they do not occupy a useful region of memory, such as in successive arguments to a function or some such.
Michael Anthony
And of course the title supplies the answer to the problem, which is not ideal for the reader wishing to solve it on his or her own.
Michael Anthony
More to the point, the problem definition states that the numbers will be given in order, which certainly makes for a trivial solution.
David Stewart Zink
Fog Creek Home |