New update is available. Click here to update.

Posted: 3 Apr, 2021

Difficulty: Moderate

```
A connected trio means a set of three nodes, where all three are interconnected.
```

```
The first line of the input contains ‘T’ denoting the number of test cases.
The first line of each test case contains ‘N’ and ‘M’ denoting the number of nodes and number of edges.
Each of the next M lines contains two space-separated integers u and v, denoting node u and node v are connected by an edge.
```

```
For each test case, return an integer denoting the minimum degree of the connected trio.
Print the output for each test case in a separate line.
```

```
You don't need to print anything, it has already been taken care of. Just implement the given function.
```

```
1 <= T <= 3
2 <= N <= 100
0 <= M <= min(500, N*(N-1)/2)
0 <= u[i], v[i] <= N-1
where, ‘N’ and ‘M’ denoting the number of nodes and number of edges and u[i], v[i] are nodes to be connected by an edge.
Time Limit: 1 sec.
```

SIMILAR PROBLEMS

Eulerian Circuit

Posted: 19 Jan, 2022

Difficulty: Hard

Minimum Swaps To Make Identical Array

Posted: 22 Jan, 2022

Difficulty: Moderate

Find Center of Star Graph

Posted: 26 Jan, 2022

Difficulty: Easy

Critical Connections in a Network

Posted: 27 Jan, 2022

Difficulty: Hard

Critical Connections in a Network

Posted: 27 Jan, 2022

Difficulty: Hard

COUNT ISLANDS

Posted: 14 Sep, 2022

Difficulty: Moderate

Categories:

Popular Courses: