Skip to content

Commit d2b3c80

Browse files
refactor 542
1 parent 891b819 commit d2b3c80

File tree

1 file changed

+0
-32
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-32
lines changed

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,6 @@
44
import java.util.LinkedList;
55
import java.util.List;
66

7-
/**
8-
* 542. 01 Matrix
9-
*
10-
* Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.
11-
12-
The distance between two adjacent cells is 1.
13-
Example 1:
14-
Input:
15-
16-
0 0 0
17-
0 1 0
18-
0 0 0
19-
Output:
20-
0 0 0
21-
0 1 0
22-
0 0 0
23-
Example 2:
24-
Input:
25-
26-
0 0 0
27-
0 1 0
28-
1 1 1
29-
Output:
30-
0 0 0
31-
0 1 0
32-
1 2 1
33-
34-
Note:
35-
The number of elements of the given matrix will not exceed 10,000.
36-
There are at least one 0 in the given matrix.
37-
The cells are adjacent in only four directions: up, down, left and right.
38-
*/
397
public class _542 {
408

419
public static class Solution1 {

0 commit comments

Comments
 (0)