A proper way to create a matrix in c++

后端 未结 10 2329
無奈伤痛
無奈伤痛 2020-11-27 05:33

I want to create an adjacency matrix for a graph. Since I read it is not safe to use arrays of the form matrix[x][y] because they don\'t check for range, I deci

10条回答
  •  有刺的猬
    2020-11-27 06:31

    Consider also how big is your graph/matrix, does performance matter a lot? Is the graph static, or can it grow over time, e.g. by adding new edges?

提交回复
热议问题