File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change 1
1
package com .fishercoder .solutions ;
2
2
3
- /**
4
- * 302. Smallest Rectangle Enclosing Black Pixels
5
- *
6
- * An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel.
7
- * The black pixels are connected, i.e., there is only one black region.
8
- * Pixels are connected horizontally and vertically.
9
- * Given the location (x, y) of one of the black pixels, return the area of the smallest (axis-aligned) rectangle that encloses all black pixels.
10
-
11
- For example, given the following image:
12
-
13
- [
14
- "0010",
15
- "0110",
16
- "0100"
17
- ]
18
- and x = 0, y = 2,
19
- Return 6.
20
- */
21
3
public class _302 {
22
4
public static class Solution1 {
23
5
private char [][] image ;
You can’t perform that action at this time.
0 commit comments