Search
⌘K

Leetcode 989. Add to Array-Form of Integer

Given an integer represented as a digit array and an integer k, compute the array-form of num + k by simulating addition from the least-significant digit, handling carries and differing lengths. This can be done in O(max(n, log k)) time and O(1) extra space (excluding output).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.