📌📌📌EASY TO UNDERSTAND C++ SOLUTION✅✅
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> minOperations(string b) {\n        \n        vector<int> ans;\n         vector<int> temp;\n         for(int i=0; i<b.length(); i++){\n             if(b[i]==\'1\'){\n                 temp.push_back(i);\n             }\n         }\n        for( int i=0 ; i<b.length(); i++){\n            int count=0;\n            for(auto j: temp){\n                count=count+ abs(j-i);\n            }\n            ans.push_back(count);\n        }\n        return ans;\n    }\n};\n```
['C++']