Driver Code
static public void Main ( ) { List < List < int > > type1 = new List < List < int > > ( ) ; type1 . Add ( new List < int > ( ) { 1 , 2 } ) ; type1 . Add ( new List < int > ( ) { 2 , 3 } ) ; type1 . Add ( new List < int > ( ) { 4 , 5 } ) ; type1 . Add ( new List < int > ( ) { 6 , 7 } ) ; List < List < int > > type2 = new List < List < int > > ( ) ; type2 . Add ( new List < int > ( ) { 1 , 5 } ) ; type2 . Add ( new List < int > ( ) { 2 , 3 } ) ; type2 . Add ( new List < int > ( ) { 4 , 7 } ) ; type2 . Add ( new List < int > ( ) { 5 , 7 } ) ; int n = type1 . Count ; int m = type2 . Count ; Console . WriteLine ( FindIntersection ( type1 , n , type2 , m ) ) ; } }