Skip to content

Commit 2f3fe71

Browse files
authored
Format code
1 parent af34c8b commit 2f3fe71

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

solution/0832.Flipping an Image/Solution.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
class Solution {
2-
public:
3-
vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) {
2+
public:
3+
vector<vector<int>> flipAndInvertImage(vector<vector<int>> &A) {
44

55
int temp, Len = A[0].size();
66

7-
for(int i=0; i<A.size(); i++){
8-
for(int j=0; j<((Len+1)/2); j++){
9-
temp = ! A[i][j];
10-
A[i][j] = ! A[i][Len-j-1];
11-
A[i][Len-j-1] = temp;
7+
for (int i = 0; i < A.size(); i++)
8+
{
9+
for (int j = 0; j < ((Len + 1) / 2); j++)
10+
{
11+
temp = !A[i][j];
12+
A[i][j] = !A[i][Len - j - 1];
13+
A[i][Len - j - 1] = temp;
1214
}
1315
}
1416
return A;

0 commit comments

Comments
 (0)