Skip to content

Commit 17df35c

Browse files
Merge pull request #1693 from CodingTestStudy2/염혜정
[염혜정] Day22
2 parents 8d0af94 + fb7903c commit 17df35c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// 완전탐색
2+
// o(n^2)
3+
4+
class Solution {
5+
public int[] findDegrees(int[][] matrix) {
6+
int[] result = new int[matrix.length];
7+
for (int i = 0; i<matrix.length; i++) {
8+
for (int k = 0; k<matrix[0].length; k++) {
9+
if (matrix[i][k] == 1) result[i]++;
10+
}
11+
}
12+
return result;
13+
}
14+
}

0 commit comments

Comments
 (0)