Which of the following can be used to store a simple undirected graph with N nodes?
vector < int > graph [ N + 1 ]
bool graph [ N + 1 ][ N + 1 ]
vector < vector < int > > graph(N+1)
All of them.
Option 1 can’t be selected as we have a 1 D vector, so, how
can we store a graph in that?