Driver code
public static void Main ( String [ ] args ) { n = 7 ; m = 7 ; a = 3 ; b = 5 ; int [ , ] edges = { { 1 , 2 } , { 2 , 3 } , { 3 , 4 } , { 4 , 5 } , { 5 , 6 } , { 6 , 7 } , { 7 , 5 } } ; List < int > [ ] v = new List < int > [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { v [ i ] = new List < int > ( ) ; }