VERY SIMPLE SOLUTION
Intuition\nFirst I was thinking to use two-pointer by seeing the topic section but after 2 Tries, I got to know just move right to left if 0 came count it and a
# Intuition\nFirst I was thinking to use two-pointer by seeing the topic section but after 2 Tries, I got to know just move right to left if 0 came count it and add it to final result if 1 came after it.  \n\n# Approach\n1) Initialize Counters:\n    1) zeros = 0: This variable will store the count of zeros (\'0\') encountered as we traverse the string from right to left.\n    2) count = 0: This will store the total number of steps required.\n2) Traverse the string from right to left:\n    1) For each character s[j] starting from the last index (rightmost character):\n        1) If the character is \'1\', add the number of zeros seen so far (zeros) to count. This is because for each \'1\', we add the number of zeros to its right to the steps count.\n        2) If the character is \'0\', increment the zeros counter by 1, because we\'ve encountered another zero that needs to be counted for any future \'1\' encountered.\n3) Return the count: After the loop, the count will contain the total number of steps required.\n\n# Example:\nConsider the string s = "10010". The process would go as follows:\n\nStart from the rightmost character:\nj = 4, s[4] = \'0\' \u2192 zeros = 1\nj = 3, s[3] = \'1\' \u2192 count = count + zeros = 0 + 1 = 1\nj = 2, s[2] = \'0\' \u2192 zeros = 2\nj = 1, s[1] = \'0\' \u2192 zeros = 3\nj = 0, s[0] = \'1\' \u2192 count = count + zeros = 1 + 3 = 4\n\nFinally, the total steps required (count) will be 4.\n\n# Complexity\n- Time complexity: O(n)\n    - The time complexity of this approach is O(n), where n is the length of the string s. This is because we are simply iterating through the string once, from the rightmost end to the leftmost end.\n\n- Space complexity: O(1)\n  - The space complexity is O(1) because we are using a fixed amount of extra space (only a few variables such as count, zeros, and j).\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long minimumSteps(string s) {\n        int n = s.size();\n        int j=n-1;\n        long long count=0;\n        long long zeros=0;\n        while(j>=0){\n            if(s[j]==\'1\'){\n                count+=zeros;\n            }else{\n                zeros++;\n            }\n            j--;\n        }\n        return count;\n    }\n};\n```\n```javascript []\nclass Solution {\n    minimumSteps(s) {\n        let n = s.length;\n        let j = n - 1;\n        let count = 0;\n        let zeros = 0;\n\n        while (j >= 0) {\n            if (s[j] === \'1\') {\n                count += zeros;\n            } else {\n                zeros++;\n            }\n            j--;\n        }\n\n        return count;\n    }\n}\n\n```\n```python []\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        n = len(s)\n        j = n - 1\n        count = 0\n        zeros = 0\n        \n        while j >= 0:\n            if s[j] == \'1\':\n                count += zeros\n            else:\n                zeros += 1\n            j -= 1\n        \n        return count\n\n```\n```java []\nclass Solution {\n    public long minimumSteps(String s) {\n        int n = s.length();\n        int j = n - 1;\n        long count = 0;\n        long zeros = 0;\n\n        while (j >= 0) {\n            if (s.charAt(j) == \'1\') {\n                count += zeros;\n            } else {\n                zeros++;\n            }\n            j--;\n        }\n\n        return count;\n    }\n}\n```\n![UPVOTE.jpeg](https://assets.leetcode.com/users/images/cab7a955-2124-44e6-8ce8-74ced2432f4c_1728978917.6766593.jpeg)\n\n
['String', 'Python', 'C++', 'Java', 'Python3', 'JavaScript']