You are given an matrix representing an undirected graph with
The entry matrix[i][j] is i and vertex j, and
Return an array containing the degree of each vertex, where the degree of vertex i is the total number of edges connected to it.
Constraints:
matrix.length matrix[i].length
matrix[i][i]
matrix[i][j] is either
matrix[i][j] matrix[j][i]
You are given an matrix representing an undirected graph with
The entry matrix[i][j] is i and vertex j, and
Return an array containing the degree of each vertex, where the degree of vertex i is the total number of edges connected to it.
Constraints:
matrix.length matrix[i].length
matrix[i][i]
matrix[i][j] is either
matrix[i][j] matrix[j][i]