Nikhil-2002 / Programming_Hactoberfest23

10 stars 75 forks source link

count-the-number-of-complete-components #97

Open ishita3513 opened 10 months ago

ishita3513 commented 10 months ago

You are given an integer n. There is an undirected graph with n vertices, numbered from 0 to n - 1. You are given a 2D integer array of edges where edges[i] = [ai, bi] denotes that there exists an undirected edge connecting vertices ai and bi.

Return the number of complete connected components of the graph.

A connected component is a subgraph of a graph in which there exists a path between any two vertices, and no vertex of the subgraph shares an edge with a vertex outside of the subgraph.

A connected component is said to be complete if there exists an edge between every pair of its vertices.

ishita3513 commented 10 months ago

Hey @Nikhil-2002 I am interested in this issue. Please assign this to me. I can provide a very easy-to-understand solution to this problem. Please assign me.