🥇 beats 100% of users in c++ (best efficient code using STL library)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nO( nums.size() * number of digits in the numbers ) \n\n- Space complexity:\n![Screenshot 2023-12-14 130122.png](https://assets.leetcode.com/users/images/1ff7e5b6-478e-4127-9ec4-08be47b4b021_1702539403.3878703.png)\nO(n), where n is the total number of digits across all the integers in the input vector nums.\n\n# Code\n```\nclass Solution \n{\npublic:\n    vector<int> separateDigits(vector<int>& nums) \n    {\n        vector<int> ans  ;\n        vector<int>subAns ;\n\n    for ( int  i = 0 ;  i < nums.size() ; i++ ) \n    {\n        \n        int remainder ;\n        if ( nums[i] >=9 ) \n\n        {\n\n        int number  =  nums[i];  \n\n        while ( number > 0 )\n        {\n           \n        remainder =  number % 10; \n        subAns.push_back(remainder) ;\n        number = number / 10 ;\n\n        }\n        \n        reverse( subAns.begin() , subAns.end()) ;  \n\n        ans.insert( ans.end() , subAns.begin() , subAns.end() )  ;\n\n        subAns.clear() ;\n\n        }\n        else\n        {\n            ans.push_back(nums[i]) ;\n        }\n\n    }\n\n    return ans ;\n\n    }\n};\n\n```
['Array', 'Math', 'Two Pointers', 'Simulation', 'C++']