[C] two ptrs | Time: O(n), Space: (n)
```C []
char * maximumBinaryString(char * const str){
	int nextZero = 0;
	for (int i = 0; str[i] != '\0'; ){
		if (str[i] != '0'){
			i += 1;
			continue;
		}
		assert('0' == str[i]);

		if ('0' == str[i + 1]){
			str[i] = '1';
			i += 1;
			continue;
		}
		assert(str[i + 1] != '0');

		if (nextZero < i + 1){
			nextZero = i + 1;
		}
		while (str[nextZero] != '\0' && str[nextZero] != '0'){
			nextZero += 1;
		}
		if ('\0' == str[nextZero]){
			break;
		}
		assert('0' == str[nextZero]);

		str[i + 1] = '0';
		str[nextZero] = '1';
		nextZero += 1;

		str[i] = '1';
		i += 1;
	}
	return str;
}
```
['C']