Simple Go code, CPU 100%
IntuitionIf all '1', return it.Find the first '0', n = count of '1' after that.
There are n '1's at the last, and only one '0'.Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
If all '1', return it.

Find the first '0', n = count of '1' after that. 
There are n '1's at the last, and only one '0'.

# Code
```golang []
func maximumBinaryString(binary string) string {
    bin := []byte(binary)    
    n := len(bin)

    res := make([]byte, n)
    for i := 0; i < n; i++ {
        res[i] = '1'
    }

    p := 0
    for p < n && bin[p] == '1' { 
        p++ 
    } // b[p] is the 1st '0'

    if p == n { // all '1'
        return binary
    }

    ones := 0   // count of '1' after p
    for i := p; i < n; i++ {
        if bin[i] == '1' { ones++ }
    }
    res[n-1-ones] = '0'

    return string(res)
}
```
['Go']