representation of example map in the problem to a graph representation using adjacency list

bfs
graph

#1

Hi guys,

I have a lesser understanding of converting matrix representation(Like in this one where city map was given in the form of a matrix) to Adjacency list representation, Anyone, please help me with that. It can help me with the build-up for a few more graph problems.how to represent the given Matrix-City map in the problem for further coding ?