2 ms·
You are not alone! This is completely unclear: the next guy reading your code will definitely "fix" the halting condition. I'd either handle i == 0 outside of t
by throwaway744678 5y ago
You are not alone! This is completely unclear: the next guy reading your code will definitely "fix" the halting condition.
I'd either handle i == 0 outside of the loop, or use something like:
for (size_t j = size; j > 0; --j) {
size_t i = j - 1;
// etc.
Or even:
for (size_t j = 0; j <= size; ++j) {
size_t i = size - j;
// etc.