Add One to a Digit Array

Asked at Intuit · Coding Questions · Difficulty: Easy · Last asked Jun 28, 2026

Given a non-negative integer written as an array of its decimal digits, produce the digits of that integer plus one. The array holds the most significant digit first, so `[1, 2, 3]` means 123 and the answer is `[1, 2, 4]`.

Loading the problem…