easy solution in c++
Intuition\n Describe your first thoughts on how to solve this problem. \nMove from write to left, k is the carry, add num[i]+k, num[i]=lastdigit\nand k = alldig
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nMove from write to left, k is the carry, add num[i]+k, num[i]=lastdigit\nand k = alldigits except last digit .... do so on.\n\n# Complexity\n- Time complexity:\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> addToArrayForm(vector<int>& num, int k) {\n        for(int i=num.size()-1;i>=0;i--){\n            num[i] += k;\n            k = num[i]/10;\n            num[i] %= 10;\n        }\n        while(k > 0){\n            num.insert(num.begin(), k%10);\n            k /= 10;\n        }\n        return num;\n    }\n};\n```
['C++']