If I have a list of lists as below ,
[[1, 2], [3, 4], [1, 5], [2, 6], [4, 8], [5, 6], [6, 7],
[7, 8], [6, 10], [7, 11], [8, 12], [10, 11],
[10, 14], [12, 16], [14, 15], [15, 16]]
and
[[1, 2], [2, 3], [3, 4], [1, 5], [4, 8],
[6, 7], [5, 9], [6, 10], [7, 11], [8, 12],
[9, 13], [10, 11], [12, 16], [13, 14], [14, 15], [15, 16]]
The above 2 lists can be visualized as in the image, where each point is represented by a list. 
I know there is a graph traversal where every visited node can be tracked as we traverse through the graph. But in this case, there is no direction mentioned.
How should I approach this problem? I am also interested in hints.