Python 3||Easy Solution||100% working 🔥🔥🔥
Intuition \nCount the total number of \'1\'s. Calculate the total steps by counting \'0\'s to the right of \'1\'s.\n\n# Approach\n\nWe just need one\'s position
# Intuition \nCount the total number of \'1\'s. Calculate the total steps by counting \'0\'s to the right of \'1\'s.\n\n# Approach\n\nWe just need one\'s positions so, iterate the string from behind and check. If it is **0** then increment the zeroes variable and if it is **1** then add the number of zeroes coming after the 1(stored in zeroes variable) to the count variable.\n\nHere its a straight forward approach\n\n# Complexity\n- Time complexity: O(n)\n\n# Code\n```\nclass Solution:\n    def minimumSteps(self, s: str) -> int:\n        \n        count=0\n        zeroes=0\n        for i in range(-1,-(len(s)+1),-1):\n            if s[i]==\'0\':\n                zeroes+=1\n            else:\n                count+=zeroes\n        return count\n                     \n```
['Python3']