Undirected graph is given with the list of edges. Build an adjacency matrix. Print the number of ones in adjacency matri
Posted: Sat Jul 09, 2022 11:47 am
Undirected graph is given with the list of edges. Build an adjacency matrix. Print the number of ones in adjacency matrix. Graph can contain multiple edges and loops. Input First line contains number of vertices n. Each of the next line contains one edge. Read the edges till the end of file. Output Build an adjacency matrix. Print the number of ones in adjacency matrix. Sample input 3 1 2 23 22 32 Sample output 5