- Graph, Graph Traversals, graph-connectivity, graph-cycle

Minimum degree of three nodes forming a triangle in a given Graph

  #include using namespace std;  int minTrioDegree(int N,                  vector& Edges){            int degree[N + 1] = { 0 };              int adj[N + 1][N + 1] = { 0 };              for (int i = 0; i < Edges.size(); i++) {                          int u = Edges[i][0];        int v = Edges[i][1];                          adj[u][v] = adj[u][v] = 1;                          degree[u]++;        degree[v]++;    }          int ans = INT_MAX;          for (int i = 1; i