Recursive C++ Solution [3ms]
\n    vector<int> plusOne(vector<int>& digits) \n    {\n        if (digits.back() == 9)\n        {\n            digits.pop_back();\n            digits = plusOne
```\n    vector<int> plusOne(vector<int>& digits) \n    {\n        if (digits.back() == 9)\n        {\n            digits.pop_back();\n            digits = plusOne(digits);\n            digits.push_back(0);\n        }\n        \n        else if (digits.empty())\n            digits.push_back(1);\n\n        else\n            digits.back()++;\n        \n        return digits;\n    }\n```\nIf the last digit is ```9```, we remove that ```9``` from the vector and add ```1``` to the vector without ```9```; essentially carrying the ```1```. After adding the ```1``` we put``` 0``` at the end of the vector, which will take the place of the ```9 ```from this particular recursion. Since the input is described as non-empty, we can assume the vector will only be empty if it was composed solely of 9's. Thus, we simply push_back ```1``` and return the vector.\nThis allows for ```plusOne([9,9,9])``` to return ```[1,0,0,0]```
['C', 'C++']