c++|o(n)|easy
class Solution {\npublic:\n    string maximumBinaryString(string b) {\n        int i,j,k,l,m=0,n=-1;\n        for(i=0;i<b.size();i++)\n        {\n            if
class Solution {\npublic:\n    string maximumBinaryString(string b) {\n        int i,j,k,l,m=0,n=-1;\n        for(i=0;i<b.size();i++)\n        {\n            if(b[i]==\'0\')\n            {\n                m++;\n            if(n==-1)\n                n=i;\n            }\n        }\n        n=(n+m-1);\n        string p="";\n        for(i=0;i<b.size();i++)\n        {\n            if(n==i)\n              p+=\'0\';\n            else\n                p+=\'1\';\n        }\n        return p;\n    }\n};
[]