The path is inevitable
IntuitionInevitably any 0 will be able to push all the ones (1) positioned at its left to the right to get to its brother (0) on the leftApproachComplexity

Tim
# Intuition
Inevitably any 0 will be able to push all the ones (1) positioned at its left to the right to get to its brother (0) on the left

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
O(n)

- Space complexity:
O(n)

# Code
```javascript []
/**
 * @param {string} binary
 * @return {string}
 */
var maximumBinaryString = function (binary) {
  binary = binary.split("");
  let p1;
  let p2;
  for (let i = 0; i < binary.length; i++) {
    if (binary[i] === "0" && p1 === undefined) {
      p1 = i;
      continue;
    }
    if (binary[i] === "0" && p2 === undefined) {
      p2 = i;
    }
    if (p1 !== undefined && p2 !== undefined) {
      binary[p1] = "1";
      binary[p2] = "1";
      p1++;
      binary[p1] = "0";
      p2 = undefined;
    }
  }

  return binary.join("");
};
```
['JavaScript']