Driver Code
public static void main ( String [ ] args ) { for ( int i = 0 ; i < edges . length ; i ++ ) edges [ i ] = new Vector < Integer > ( ) ; int A [ ] [ ] = { { 1 , 2 } , { 2 , 3 } , { 3 , 4 } } ; for ( int i = 0 ; i < 3 ; i ++ ) { Add_edge ( A [ i ] [ 0 ] , A [ i ] [ 1 ] ) ; }