Print adjacency list representaion ot graph
function printGraph ( adj , V ) { let v = 0 , w = 0 ; for ( let u = 0 ; u < V ; u ++ ) { document . write ( " " + u + " " ) ; for ( let it = 0 ; it < adj [ u ] . length ; it ++ ) { v = adj [ u ] [ it ] [ 0 ] ; w = adj [ u ] [ it ] [ 1 ] ; document . write ( " " + v + " " + w + " " ) } } }