Your question is Add Unsigned Int to Big Number. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
YouTube may represent an extremely large video view count as an array of decimal digits to avoid native integer-size limits. Implement add_unsigned(digits, value) to add a nonnegative integer value to that number and return the resulting digit array.
Process the number directly from right to left, and do not convert the full digit array into a Python integer or string. The input array must not be modified.
digits, a nonempty list of integers from 0 through 9, ordered from most significant to least significant digit; and value, an unsigned integer.def add_unsigned(digits, value):