Skip to content

Commit 41e1acf

Browse files
committed
[not completed]leetcode_5309_Number_of_Operations_to_Make_Network_Connected
1 parent 034994d commit 41e1acf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Solution {
2+
public:
3+
int makeConnected(int n, vector<vector<int>>& connections) {
4+
int cablesCount = connections.size();
5+
if(n - 1 > cablesCount) // 线不够
6+
return -1;
7+
8+
}
9+
};

0 commit comments

Comments
 (0)