if a graph is unidirectional, then in addEdge function: ‘bidir’ default value will be ‘false’.
then how to get all vertex in the adjacency list map<T, list> ( including the leaf nodes which doesn’t have any outgoing edge)
something similar to this, but actually correct
void addEdge(T u, T v, bool bidir = true)
{
adjList[u].push_back(v);
if(bidir)
adjList[v].push_back(u);
else
adjList[v].push_back(NULL); //trying to get this included in the map
}