Simple beginner solution || Addition-carry concept ||✔
\n\nclass Solution {\npublic:\n    vector<int> addToArrayForm(vector<int>& num, int k) {\n        int n=num.size();\n        vector<int> ans;\n        int carry
\n```\nclass Solution {\npublic:\n    vector<int> addToArrayForm(vector<int>& num, int k) {\n        int n=num.size();\n        vector<int> ans;\n        int carry=0;\n        for(int i=n-1;i>=0;--i){\n             int res=num[i]+k%10+ carry;\n             ans.push_back(res%10);\n              carry=res/10;\n              k=k/10;\n              \n        }\n      \n         while(k){\n           int res=carry+k%10;\n              ans.push_back(res%10);\n              carry=res/10;\n              k=k/10;\n         }\n         if(carry){\n             ans.push_back(carry);\n         }\n         \n        reverse(ans.begin(),ans.end());\n        \n        return ans;\n    }\n};\n```
['Array', 'Math', 'C++']