C++| FAST AND EFFICIENT | with explanation
Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome\n\nContinuin
**Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome**\n\nContinuing the example of 123 + 912, we start with [1, 2, 3+912]. Then we perform the addition 3+912, leaving 915. The 5 stays as the digit, while we \'carry\' 910 into the next column which becomes 91.\n\nWe repeat this process with [1, 2+91, 5]. We have 93, where 3 stays and 90 is carried over as 9. Again, we have [1+9, 3, 5] which transforms into [1, 0, 3, 5].\n```\nclass Solution {\npublic:\nvector<int> addToArrayForm(vector<int> A, int K) {\n    for(int i=A.size()-1;i>=0&&K>0;i--)\n    {\n        A[i]+=K;\n        K=A[i]/10;\n        A[i]%=10;\n    }\n    while(K>0)\n    {\n        A.insert(A.begin(),K%10);\n        K/=10;\n    } \n    return A;\n    }\n};
['C']