Java Greedy Solution
Complexity\n- Time complexity:O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(1)\n Add your space complexity here, e.g. O(n) \n\n# Code
# Complexity\n- Time complexity:$$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public long minimumSteps(String s) {\n        // char[] ch = s.toCharArray();\n\n        // int white = 0; // count of number of 0\'s in the string....\n        // long count = 0;\n        // for (int i = ch.length - 1; i >= 0; i--) {\n        //     if (ch[i] == \'1\') {\n        //         count += white;\n        //     } else {\n        //         white++;\n        //     }\n        // }\n        // return count;\n\n\n\n\n        long sum = 0;\n        long count = 0;\n        for (char ch : s.toCharArray()) {\n            count += ch - \'0\';\n            sum += ch == \'0\' ? count : 0;\n        }\n        return sum;\n    }\n}\n```
['Two Pointers', 'String', 'Greedy', 'Java']