package leetcode;

/**
 * https://leetcode.com/problems/largest-1-bordered-square/
 */
public class Problem1139 {
    public int largest1BorderedSquare(int[][] grid) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1139 prob = new Problem1139();
        System.out.println(prob.largest1BorderedSquare(new int[][]{
            {1, 1, 1},
            {1, 0, 1},
            {1, 1, 1}
        })); // 9
        System.out.println(prob.largest1BorderedSquare(new int[][]{
            {1, 1, 0, 0},
        })); // 1
    }
}

@@ -559,16 +559,620 @@
 ); // 1%0A
+        System.out.println(prob.largest1BorderedSquare(new int%5B%5D%5B%5D%7B%0A            %7B1, 1, 1, 1%7D,%0A        %7D)); // 1%0A        System.out.println(prob.largest1BorderedSquare(new int%5B%5D%5B%5D%7B%0A            %7B1, 1, 1, 1%7D,%0A            %7B1, 1, 1, 1%7D%0A        %7D)); // 4%0A        System.out.println(prob.largest1BorderedSquare(new int%5B%5D%5B%5D%7B%0A            %7B1, 1, 1, 1%7D,%0A            %7B1, 0, 0, 1%7D,%0A            %7B1, 1, 1, 1%7D,%0A        %7D)); // 1%0A        System.out.println(prob.largest1BorderedSquare(new int%5B%5D%5B%5D%7B%0A            %7B1, 1, 1, 1%7D,%0A            %7B1, 0, 0, 1%7D,%0A            %7B1, 0, 0, 1%7D,%0A            %7B1, 1, 1, 1%7D,%0A        %7D)); // 16%0A
     %7D%0A%7D%0A

Update problem 1139