If we are given the adjacency matrix of a weighted (undirected) graph, how can we use it to determine the number of edges in the graph?
What will be an ideal response?
Count the number of entries that are neither zero nor infinity. Then, divide this number by 2.
Computer Science & Information Technology