Driver Code
type1 = [ [ 1 , 2 ] , [ 2 , 3 ] , [ 4 , 5 ] , [ 6 , 7 ] ] NEW_LINE type2 = [ [ 1 , 5 ] , [ 2 , 3 ] , [ 4 , 7 ] , [ 5 , 7 ] ] NEW_LINE n = len ( type1 ) NEW_LINE m = len ( type2 ) NEW_LINE print ( FindIntersection ( type1 , n , type2 , m ) ) NEW_LINE