[Java] array solution like in school
\nclass Solution {\n    public List<Integer> addToArrayForm(int[] num, int k) {\n        int plus = 0;\n        LinkedList<Integer>res = new LinkedList<>();\n  
```\nclass Solution {\n    public List<Integer> addToArrayForm(int[] num, int k) {\n        int plus = 0;\n        LinkedList<Integer>res = new LinkedList<>();\n        for (int i=0;i<num.length || k>0;){\n            int currentDigitK = k%10;\n            int currenntDigitRes = ((i<num.length)?num[num.length-1-i]:0) + currentDigitK+plus;\n            plus=currenntDigitRes>9?1:0; \n            res.addFirst(currenntDigitRes%10);\n            i++;\n            k/=10;\n        }\n        if (plus>0)res.addFirst(plus);\n        return res;\n    }\n}\n```
[]