package leetcode;

/**
 * https://leetcode.com/problems/maximum-binary-string-after-change/
 */
public class Problem1702 {
    public String maximumBinaryString(String binary) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1702 prob = new Problem1702();
        System.out.println(prob.maximumBinaryString("000110")); // "111011"
        System.out.println(prob.maximumBinaryString("0000110")); // "1111011"
        System.out.println(prob.maximumBinaryString("01")); // "01"
        System.out.println(prob.maximumBinaryString("100011001010101001")); // "111111111101111111"
        System.out.println(prob.maximumBinaryString("1000111100101011101")); // "1111111101111111111"
        System.out.println(prob.maximumBinaryString("01010101010101")); // 11111101111111
        System.out.println(prob.maximumBinaryString("0101")); // 1011
        System.out.println(prob.maximumBinaryString("1111")); // 1111
        System.out.println(prob.maximumBinaryString("0000")); // 1110
    }
}


@@ -620,32 +620,234 @@
 11111101111111%22%0A
+        System.out.println(prob.maximumBinaryString(%22000011001010101001%22)); // %22111111111101111111%22%0A        System.out.println(prob.maximumBinaryString(%221000011001010101001%22)); // %221111111111101111111%22%0A
         System.o
@@ -988,25 +988,132 @@
 ing(%22010
+0111
 10
+0
 10101
+11
 01
+%22)); // %221111111011111111111%22%0A        System.out.println(prob.maximumBinaryString(%2200101111001010111
 01%22)); /
@@ -1114,30 +1114,37 @@
 %22)); // 
+%22
 111111
-0
+101
 1111111
+111%22
 %0A       
@@ -1197,18 +1197,38 @@
 0101
-%22)); // 10
+0101010101%22)); // 111111011111
 11%0A 
@@ -1283,20 +1283,92 @@
 ng(%22
-1111
+0101%22)); // %221011%22%0A        System.out.println(prob.maximumBinaryString(%221010
 %22)); // 
 1111
@@ -1363,20 +1363,94 @@
 %22)); // 
+%22
 11
-11
+01%22%0A        System.out.println(prob.maximumBinaryString(%221111%22)); // %221111%22
 %0A       
@@ -1507,20 +1507,522 @@
 %22)); // 
+%22
 1110
+%22%0A        System.out.println(prob.maximumBinaryString(%2200010101%22)); // %2211110111%22%0A        System.out.println(prob.maximumBinaryString(%220100000101%22)); // %221111110111%22%0A        System.out.println(prob.maximumBinaryString(%220000000101%22)); // %221111111011%22%0A        System.out.println(prob.maximumBinaryString(%221000000101%22)); // %221111111011%22%0A        System.out.println(prob.maximumBinaryString(%221111000101%22)); // %221111111011%22%0A        System.out.println(prob.maximumBinaryString(%221011000101%22)); // %221111101111%22
 %0A    %7D%0A%7D

Update problem 1702