C++ 4ms
\nclass Solution {\npublic:\n    vector<int> plusOne(vector<int>& digits) {\n        for(int i = digits.size() - 1;i >= 0;i--){\n            if(digits[i] != 9){
```\nclass Solution {\npublic:\n    vector<int> plusOne(vector<int>& digits) {\n        for(int i = digits.size() - 1;i >= 0;i--){\n            if(digits[i] != 9){\n                digits[i]++;\n                return digits;\n            }\n            else\n                digits[i] = 0;\n        }\n        digits.insert(digits.begin(),1);\n        return digits;\n    }\n};\n```
['C', 'C++']