Explain the question


#1

Can somebody explain what does “Clone of graph” mean?


#2

It’s a deep copy of the graph, i.e. you create a new node corresponding to each and every node while linking the cloned node to cloned neighbors of the original graph.


#3

Just iterate over first gaph and maintain a hashMap of original and new nodes. More so like linked list copy with randome pointer question.


#4

From an example I tried with the “See expected output” button, it seems what is expected is converting the adjacency matrix to an adjacency list.