4 ms·
The modulo represents the cycle. Maybe it would be helpful to rewrite the loop with a condition as you described, and %= i and j with n after incrementing (by
by tomjakubowski 9y ago
The modulo represents the cycle.
Maybe it would be helpful to rewrite the loop with a condition as you described, and %= i and j with n after incrementing (by 1 or by 2) both variables in the loop body.