JS || Solution by Bharadwaj
Code\n\nvar maximumBinaryString = function (binary) {\n    let zeroCount = 0, firstZeroIndex = -1;\n    for (let i = 0; i < binary.length; i++) {\n        let c
# Code\n```\nvar maximumBinaryString = function (binary) {\n    let zeroCount = 0, firstZeroIndex = -1;\n    for (let i = 0; i < binary.length; i++) {\n        let char = binary[i];\n        if (char === \'0\') {\n            zeroCount++;\n            if (firstZeroIndex === -1) firstZeroIndex = i;\n        }\n    }\n    let resultArray = new Array(binary.length).fill(1);\n    resultArray[firstZeroIndex + zeroCount - 1] = 0;\n    return resultArray.join(\'\');\n};\n```
['JavaScript']