✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1.1\nTime complexity: O(n). Space comple
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1.1\nTime complexity: $$O(n)$$. Space complexity: $$O(1)$$.\n```python3\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        return (b:=0)+sum((b:=b+(c>\'0\'))*(c<\'1\') for c in s)\n```\n\n# Code #1.2 - Unwrapped\n```python3\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        res = black = 0\n        for c in s:\n            if c == \'1\':\n                black += 1\n            else:\n                res += black\n\n        return res\n```\n\n# Code #2.1\nTime complexity: $$O(n)$$. Space complexity: $$O(1)$$.\n```python3\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        return (i:=0)+sum(j-(i:=i+1)+1 for j,c in enumerate(s) if c<\'1\')\n```\n\n# Code #2.2 - Unwrapped\n```python3\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        res, i = 0, 0\n        for j,c in enumerate(s):\n            if c == \'0\':\n                res += j - i\n                i += 1\n\n        return res\n```\n\n(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not claimed to be \'true\' oneliners - please, remind about drawbacks only if you know how to make it better)
['Two Pointers', 'String', 'Python', 'Python3']