Search⌘ K
AI Features

Plus One

Plus One represents a non-negative integer as an array of digits. Add one to the number and return the result in the same format, including any new leading digit.

Statement

You are given a non-negative integer represented as an integer array, digits, where each element in digits[i] ...