Easy and Simplest C++ best solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: \n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> plusOne(vector<int>& digits) {\n        int n= digits.size();\n        for(int i=n-1; i>=0; i--){\n            if(digits[i]<9){\n                digits[i]+=1;\n                return digits;\n            }\n            else{\n                digits[i]=0;\n            }\n        }\n        digits[0]=1;\n        digits.push_back(0);\n        return digits;        \n    }\n};\n```\n![4i5ri4f9.png](https://assets.leetcode.com/users/images/280cc0bf-e1b5-417b-a72d-4ba7e737f34f_1688448157.4485767.png)
['Array', 'Math', 'C++']