leetCode 66. Plus One配列


66. Plus One
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をプラスして、求めた新しい配列.
上位に立つ.
class Solution {
public:
    vector plusOne(vector& digits) {
        int len = digits.size();
        for(int i = len - 1; i >= 0;i--)
        {
            if(digits[i] + 1  
  

2016-08-08 23:27:58