100% effective 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:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```java []\nclass Solution {\n    public long minimumSteps(String s) {\n        int n = s.length();\n        int i = n-1;\n        int j = n;\n        long swaps = 0;\n        while(i>=0) {\n            if(s.charAt(i)==\'1\') {\n                j--;\n                swaps = swaps + (j-i);\n            }\n            i--;\n        }\n        return swaps;\n    }\n}\n```
['Java']