Skip to content

Commit d0d0d9a

Browse files
refactor 302
1 parent f159e4e commit d0d0d9a

File tree

1 file changed

+7
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+7
-2
lines changed

src/main/java/com/fishercoder/solutions/_302.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
package com.fishercoder.solutions;
22

33
/**
4-
* An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one black region. Pixels are connected horizontally and vertically. 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.
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.
510
611
For example, given the following image:
712
@@ -14,7 +19,7 @@
1419
Return 6.
1520
*/
1621
public class _302 {
17-
class Solution {
22+
public static class Solution1 {
1823
private char[][] image;
1924

2025
public int minArea(char[][] iImage, int x, int y) {

0 commit comments

Comments
 (0)