LeetCode – Plus One (Java)
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. Java Solution To solve this problem, we can use a flag to mark if the current digit needs to be changed. public int[] … Read more