In the lecture video, the vertices are numbered as 0,1,2,3 and we the iterating from i = 0 to V.
But what if vertices have different numbers that does not start from 0 and are non-consecutive like - 8,1, 0, 3, . In that case how we will iterate ?
Graph Adjacency List
hello @vaishnavtannu
then in that case using map will be a better option.
in later videos it is covered .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.