java easy code
\nclass Solution {\n    public List<Integer> addToArrayForm(int[] nums, int k) {\n        List<Integer> list=new ArrayList<>();\n        int i=nums.length-1;\n 
```\nclass Solution {\n    public List<Integer> addToArrayForm(int[] nums, int k) {\n        List<Integer> list=new ArrayList<>();\n        int i=nums.length-1;\n        while(i>=0 || k>0)\n        {\n            if(i>=0)\n                k=k+nums[i];\n            list.add(k%10);\n            k/=10;\n            i--;\n        }\n        Collections.reverse(list);\n        return list;\n    }\n}\n```
['Java']