C++✅✅ | Faster🧭 than 95%🔥 | NO SHORTCUT MEHTHOD❗❗❗ | Self Explanatory Code |
Code\n\n# Please Do Upvote!!!!\n##### Connect with me on Linkedin -> https://www.linkedin.com/in/md-kamran-55b98521a/\n\n\n\nclass Solution {\npublic:\n\n    ve
# Code\n\n# Please Do Upvote!!!!\n##### Connect with me on Linkedin -> https://www.linkedin.com/in/md-kamran-55b98521a/\n\n```\n\nclass Solution {\npublic:\n\n    vector<int> addToArrayForm(vector<int>& num, int k) {\n        \n        int carry = 0;\n        int j = num.size() - 1;\n\n        while(j >= 0)\n        {\n\n         int sum = num[j] + (k % 10) + carry;\n         k /= 10;\n\n         num[j--] = sum % 10;\n         carry = sum/10;\n\n        }\n\n        while(k > 0)\n        {\n\n         int sum = (k % 10) + carry;\n         k /= 10;\n    \n         num.insert(num.begin(), sum%10);\n         carry = sum/10;\n       \n        }\n\n        if(carry > 0) num.insert(num.begin(), carry);\n        \n        return num;\n    }\n};\n\n```\n![b62ab1be-232a-438f-9524-7d8ca4dbd5fe_1675328166.1161866.png](https://assets.leetcode.com/users/images/98b7adbc-5abf-45f7-9b5b-538574194654_1676344687.6513524.png)
['C++']