C++||Simple||0ms
\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      
```\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]=0;\n            }\n            else{\n                digits[i]++;\n                return digits;\n            }\n        }\n        digits[0]=1;\n        digits.push_back(0);\n        return digits;\n    }\n};\n```\n**Please upvote if you like the solution\ncomment if have doubts**
['C', 'C++']