Very Simple C solution(basic apporch)(100%)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n1. create a result arra
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. create a result array of size (n*6) {6 is the max number of digits since a[i]<=100000}\n2. create a array to hold value of each digit and add it to res from right to left (question says to allocate in same order )\n3. return the result array\n# Complexity\n- Time complexity:O(n*k) {k is the number of digits }\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n*k)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nint* separateDigits(int* a, int n, int* rSize) {\n    int* res = malloc(sizeof(int) * (n*6));\n    int k = 0;\n    for (int i = 0; i < n; i++) {\n        int x = a[i];\n        int digits[6], dIndex = 0;\n        while (x != 0) {\n            digits[dIndex++] = x % 10;\n            x /= 10;\n        }\n        for (int j = dIndex - 1; j >= 0; j--) {\n            res[k++] = digits[j];\n        }\n    }\n    *rSize = k;\n    return res;\n}\n```
['C']