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 05227d8 commit f8030ccCopy full SHA for f8030cc
src/main/java/g1701_1800/s1761_minimum_degree_of_a_connected_trio_in_a_graph/Solution.java
@@ -6,14 +6,12 @@ public class Solution {
6
public int minTrioDegree(int n, int[][] edges) {
7
int[] degrees = new int[n + 1];
8
int[][] adjMatrix = new int[n + 1][n + 1];
9
-
10
for (int[] edge : edges) {
11
adjMatrix[edge[0]][edge[1]] = 1;
12
adjMatrix[edge[1]][edge[0]] = 1;
13
degrees[edge[0]]++;
14
degrees[edge[1]]++;
15
}
16
17
int minTrios = Integer.MAX_VALUE;
18
for (int i = 1; i <= n; i++) {
19
for (int j = i + 1; j <= n; j++) {
0 commit comments