✅ Simple [C++] solution with good explanation.
Intuition\nIf we thought that all elements of the vector is a number we need to increase it by 1. The input can be 100 digits so we must handle that through dig
# Intuition\nIf we thought that all elements of the vector is a number we need to increase it by 1. The input can be 100 digits so we must handle that through digits.\n\n# Approach\nFirst we increment the first digit (last element) by 1, if it becomes 10 we make it 0 ans add 1 to the second digit.. until the last digit (first element), if it becoms 10 we make it 1 and push_back a leading zero.\n\n# Complexity\n- Time complexity:\nO(n)\n\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> plusOne(vector<int>& v) {\n        int n = v.size();\n        for(int i = n-1; i >= 0; i--){\n            if(i == n-1)\n                v[i]++;\n            if(v[i] == 10){\n                v[i] = 0;\n                if(i != 0){\n                    v[i-1]++;\n                }\n                else{\n                    v.push_back(0);\n                    v[i] = 1;\n                }\n            }\n        }\n        return v;\n    }\n};\n```\n\nDon\'t forget please :\')\n\n![UPVOTE.jpg](https://assets.leetcode.com/users/images/a6b046f8-0b13-4de1-95f9-78327b0dccba_1673782056.4431267.jpeg)\n
['C++']