Share my 4ms C++ solution.
class Solution {\n    public:\n        vector<int> plusOne(vector<int> &digits) {   //\u672a\u8003\u8651\u524d\u7f000\u7684\u60c5\u51b5\n            for(int i =
    class Solution {\n    public:\n        vector<int> plusOne(vector<int> &digits) {   //\u672a\u8003\u8651\u524d\u7f000\u7684\u60c5\u51b5\n            for(int i = digits.size() - 1; i >= 0; i--)   \n            {\n                if(digits[i] != 9)\n                {\n                    digits[i] ++;\n                    break;\n                }\n                digits[i] = 0;\n            }\n            if(digits[0] == 0)\n                digits.insert(digits.begin(), 1);\n            return digits;\n            \n        }\n    };
[]