In line 11 why have we taken v=graph.size() and not graph[0].size()?
Doubt in the video
graph.size() gives the total number of nodes in the graph. But graph[0].size() just gives the number of nodes the node 0 is connected to.
In line 11 why have we taken v=graph.size() and not graph[0].size()?
graph.size() gives the total number of nodes in the graph. But graph[0].size() just gives the number of nodes the node 0 is connected to.