|| Understandable C++ 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:\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        int carry=0;\n        int n=num.size();\n        for(int i=n-1;i>=0 ;i--)\n        {\n            int temp=carry+(k%10)+num[i]; // performing addition \n            carry=temp/10; // calculating carry\n            num[i]=temp%10;\n            k=k/10;\n        }\n        while(k) //if k is greater than num\'s size \n        {\n            int temp=(k%10)+carry;\n            num.insert(num.begin(),temp%10);\n            carry=temp/10;\n            k/=10;\n        }\n        if(carry >0) num.insert(num.begin(),carry); // if at last carry is left we need to insert it\n        // at the beginnnig  \n        return num;\n    }\n};\n```
['C++']