Algorithm · Coinbase · Easy
You are given an array digits whose entries are the decimal digits of a non-negative integer. The digits are stored in order from most significant to least significant, and each value is between 0 and 9 inclusive. Increment the represented integer by 1, then return the resulting digit list. Do not transform the whole array into a native big-integer type and then back. Work directly with the digits. After you finish, analyze the runtime and memory usage of your algorithm.…
Checking your access…