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.
题意:给定一个数组,元素都是非负数,整个数组用于表示一个整数。现在这个整数加1,求加1后的数组。
分类:数组,数学
解法1:从后往前加,注意保留flag来表示进位。
原文链接http://blog.csdn.net/crazy__chen/article/details/46008945