0ms/simple java solution/easy to understand/beginner friendly
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 {\n    public List<Integer> addToArrayForm(int[] num, int k) {\n      List<Integer> r = new ArrayList<>();\n      int l=num.length-1;\n      int c=0;\n      while(l>=0||k>0){\n          int sum=c;\n          if(l>=0){\n              sum+=num[l];\n              l--;\n          }\n          if(k>=0){\n              sum+=(k%10);\n              k/=10;\n          }\n          r.add(sum%10);\n          c=sum/10;\n      }\n      if(c>0){\n          r.add(c);\n      }\n    Collections.reverse(r);\n    return r;\n    }\n}\n```
['Java']