(nv: usize)
| 108 | /// create a V-vertex graph with no edges |
| 109 | impl From<usize> for Graph { |
| 110 | fn from(nv: usize) -> Self { |
| 111 | let mut adj = Vec::with_capacity(nv); |
| 112 | for _ in 0..nv { |
| 113 | adj.push(LinkedList::default()); |
| 114 | } |
| 115 | |
| 116 | Self { nv, ne: 0, adj } |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | impl From<&str> for Graph { |