Skip to content

Commit 8259293

Browse files
refactor 661
1 parent 926e995 commit 8259293

File tree

1 file changed

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

1 file changed

+0
-28
lines changed

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 661. Image Smoother
5-
*
6-
* Given a 2D integer matrix m representing the gray scale of an image,
7-
* you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of
8-
* all the 8 surrounding cells and itself. If a cell has less than 8 surrounding cells, then use as many as you can.
9-
10-
Example 1:
11-
Input:
12-
[[1,1,1],
13-
[1,0,1],
14-
[1,1,1]]
15-
16-
Output:
17-
[[0, 0, 0],
18-
[0, 0, 0],
19-
[0, 0, 0]]
20-
21-
Explanation:
22-
For the point (0,0), (0,2), (2,0), (2,2): floor(3/4) = floor(0.75) = 0
23-
For the point (0,1), (1,0), (1,2), (2,1): floor(5/6) = floor(0.83333333) = 0
24-
For the point (1,1): floor(8/9) = floor(0.88888889) = 0
25-
26-
Note:
27-
The value in the given matrix is in the range of [0, 255].
28-
The length and width of the given matrix are in the range of [1, 150].
29-
30-
*/
313
public class _661 {
324
public static class Solution1 {
335
public int[][] imageSmoother(int[][] M) {

0 commit comments

Comments
 (0)