We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7627e76 commit 6b13801Copy full SHA for 6b13801
C++/image-smoother.cpp
@@ -4,7 +4,7 @@
4
class Solution {
5
public:
6
vector<vector<int>> imageSmoother(vector<vector<int>>& M) {
7
- const auto m = M.size(), n = M[0].size();
+ const auto& m = M.size(), &n = M[0].size();
8
vector<vector<int>> result(M);
9
for (int i = 0; i < m; ++i) {
10
for (int j = 0; j < n; ++j) {
@@ -16,7 +16,7 @@ class Solution {
16
17
private:
18
int getGray(const vector<vector<int>>& M, int i, int j) {
19
- const auto& m = M.size(), n = M[0].size();
20
double total = 0.0;
21
int count = 0;
22
for (int r = -1; r < 2; ++r) {
0 commit comments