Use math solution, kotlin for dummies
Intuition\nSimple math issue, count 0 and calcualte the total\n\n# Approach\n- Loop from the end to the start\n- Count how many 0 exist and calculate the result
# Intuition\nSimple math issue, count 0 and calcualte the total\n\n# Approach\n- Loop from the end to the start\n- Count how many 0 exist and calculate the result\n\n# Complexity\n- Time complexity: $$O(n)$$\n\n- Space complexity: $$O(1)$$\n\n# Code\n```kotlin []\nclass Solution {\n    fun minimumSteps(s: String): Long {\n        var total = 0L\n        var startCount = false\n        var count = 1\n        for(i in s.length - 1 downTo 0) {\n            if(startCount) {\n                if(s[i] == \'0\') {\n                    count++\n                } else {\n                    total += count\n                }\n            } else if(s[i] == \'0\') {\n                   startCount = true \n                }\n        }\n        return total\n    }\n}\n```
['Kotlin']