Undirected Graph implementation in Java
Graph implementation
adjacency matrix
本质是一个大小为v(vertex的数量) 的数组,每个数组存储了一个LinkedList对象,这里代表的是与当前vertex相连的数
这里的Queue不是java内置的队列,而是调用之前实现的队列,这里用linkedlist来代替
1 | package graph; |
- Post title:Undirected Graph implementation in Java
- Post author:Yuxuan Wu
- Create time:2021-10-03 09:50:23
- Post link:yuxuanwu17.github.io2021/10/03/2021-10-03-Undirected-Graph-implementation-in-Java/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.