Solution with no strings or extra lists! Faster than 100%. Done with recursion!
\n# Code\n\nclass Solution {\n    int pt;\n    int[] ans;\n    public void rec(int n) {\n        if(n == 0) return;\n        rec(n/10);\n        int digit = n %
\n# Code\n```\nclass Solution {\n    int pt;\n    int[] ans;\n    public void rec(int n) {\n        if(n == 0) return;\n        rec(n/10);\n        int digit = n % 10;\n        ans[pt] = digit;\n        pt++;\n    }\n    public int[] separateDigits(int[] nums) {\n        int len = 0;\n        for (int i : nums) {\n            while(i > 0) {\n                len++;\n                i /= 10;\n            }\n        }\n        ans = new int[len];\n        for (int i : nums) {\n            rec(i);\n        }\n        return ans;\n    }\n}\n```
['Recursion', 'Java']