Easiest answer | c++|best accuracy
Intuition\ntraversing the vector in a reverse manner\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n1. iterate from the last eleme
# Intuition\ntraversing the vector in a reverse manner\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n1. iterate from the last element in the vector\n2. store the value of digit in the answer vector by using mod function\n3. reverse the vector for the desired answer\n<!-- Describe your approach to solving the problem. -->\n\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> separateDigits(vector<int>& nums) {\n        vector<int>answer;\n        //traverse backwards\n        for(int i = nums.size()-1 ; i >=0 ; i--){\n            //store digits\n            for(int j = nums[i] ; j >0 ; j = j/10){\n                answer.push_back(j%10);\n            }\n         }\n        reverse(answer.begin() , answer.end());\n        return answer;\n    }\n};\n```
['C++']