Array
66. Plus One
Adding one ripples from the right while there's a carry, and it dies the instant a digit is below 9 — that digit ticks up and nothing else changes, so you can stop. The only case that grows the array…
Loading…
Adding one ripples from the right while there's a carry, and it dies the instant a digit is below 9 — that digit ticks up and nothing else changes, so you can stop. The only case that grows the array…
Loading…