Add all adjacent nodes to the node in the graph
unordered_map < int , vector < int > > graph ; unordered_map < int , vector < int > > graph_rev ; for ( int i = 0 ; i < edges . size ( ) ; i ++ ) { int x = edges [ i ] [ 0 ] ; int y = edges [ i ] [ 1 ] ;