CPP | EASY
class Solution {\npublic:\n    string maximumBinaryString(string b) \n    {\n       int l=-1;\n       for(int i=0;i<b.length();++i)\n       {\n            if(b[
class Solution {\npublic:\n    string maximumBinaryString(string b) \n    {\n       int l=-1;\n       for(int i=0;i<b.length();++i)\n       {\n            if(b[i]==\'0\')\n            {\n                if(l==-1)\n                    l=i;\n                else\n                {\n                   b[i]=\'1\';\n                   b[l]=\'1\';\n                    ++l;\n                  b[l]=\'0\';\n                }\n            }\n       }\n        return b;\n    }\n};
[]