Straightforward solution in C
Intuition\n- Basically, the only cases needed to check to solve the problem are the ones in the code comment.\n# Approach\n- First, set slow as the index of the
# Intuition\n- Basically, the only cases needed to check to solve the problem are the ones in the code comment.\n# Approach\n- First, set `slow` as the index of the first `\'0\'` in the array.\n\n    `\n    if(slow < 0) slow = fast;\n    `\n\n- Then, check if the next `\'0\'` is one index to the right of `slow`. If so, perform **operation 1**, which is discussed in the problem description, and set `slow` as the index of the next left-most `\'0\'`.\n- Lastly, if the `\'0\'s` are separated in between `\'1\'s`, then **operation 2** is needed. However, instead of performing the step-by-step procedure, we can observe that the outcome of the operation will always be:\n    - the element in `binary[slow]` and `binary[fast]` will change to `\'1\'`.\n    - the element after `slow` will change to `\'0\'`.\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nchar* maximumBinaryString(char* binary) {\n    int fast, slow;\n    for(fast = 0, slow = -1; binary[fast] != \'\\0\'; fast++)\n        if(binary[fast] == \'0\'){\n            if(slow < 0) //[10...]\n                slow = fast; // After this, binary[slow] will always be \'0\'\n            else if(slow == fast - 1){ //[00]\n                binary[slow] = \'1\';\n                slow = fast;\n            }\n            else if(slow != fast - 1){ //[0...0]\n                binary[slow] = binary[fast] = \'1\';\n                slow++;\n                binary[slow] = \'0\';\n            }\n        }\n    return binary;\n}\n```
['C']