2 ms·
You probably want i=1 since i=0 is an answer you can predict: i = 0 implies that i = 0 + 0 = 0; so the loop doesn’t evolve, and the whole thing can be optimize
by zmgsabst 4y ago
You probably want i=1 since i=0 is an answer you can predict:
i = 0 implies that i = 0 + 0 = 0; so the loop doesn’t evolve, and the whole thing can be optimized to just i = 0.
For i=1, the loop simplifies to 2^count and a count-length type, which is the point I think you wanted.
- munificent 4y agoHeh, oops, yes. :)