Preserve leading ones and maximize on remaining
\nclass Solution:\n    def maximumBinaryString(self, binary: str) -> str:\n        n = len(binary)\n        i = 0\n        while i < n and binary[i] == "1":\n  
```\nclass Solution:\n    def maximumBinaryString(self, binary: str) -> str:\n        n = len(binary)\n        i = 0\n        while i < n and binary[i] == "1":\n            i += 1\n        o = z = 0\n        for j in range(i, n):\n            if binary[j] == "0":\n                z += 1\n            else:\n                o += 1\n        return "1" * i + "1" * max(z - 1, 0) + "0" * min(z, 1) + "1" * o\n```
[]