Easy Faster Efficient Java Soln
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public String maximumBinaryString(String binary) {\n        int n = binary.length();\n        int zeros = 0, ones = 0;\n        for(int i = 0; i < n; i++){\n            char ch = binary.charAt(i);\n            if(ch == \'0\'){\n                zeros++;\n            } else if(zeros == 0){\n                ones++;\n            }\n        }\n        StringBuilder sb = new StringBuilder("1".repeat(n));\n        if(ones < n){\n            sb.setCharAt(ones + zeros - 1, \'0\');\n        }\n        return sb.toString();   \n    }\n}\n```
['String', 'Java']