Simple solution for beginners(using two loops)
Intuition\nKeep storing digits of ever number then copy thosse digits into another array and return it as answer\n\n# Approach\nUse the same approach we used fo
# Intuition\nKeep storing digits of ever number then copy thosse digits into another array and return it as answer\n\n# Approach\nUse the same approach we used for storing digits of number from unit place. Then reverse it bcoz it\'s asked in que to return it in same order.\n\n# Complexity\n- Time complexity:\no(n*m)\n\n- Space complexity:\nO(N)\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> separateDigits(vector<int>& nums) {\n        vector<int> ans;\n        \n        int n = nums.size();\n        \n        for(int i=0; i<n; i++){\n            vector<int> temp;\n            while(nums[i] != 0){\n                temp.push_back(nums[i]%10);\n                nums[i] /= 10;\n            }\n            reverse(temp.begin(), temp.end());\n//copying each digit in our ans array\n            for(int j=0; j<temp.size(); j++){\n                ans.push_back(temp[j]);\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']