Driver Code
let type1 = [ [ 1 , 2 ] , [ 2 , 3 ] , [ 4 , 5 ] , [ 6 , 7 ] ] ; let type2 = [ [ 1 , 5 ] , [ 2 , 3 ] , [ 4 , 7 ] , [ 5 , 7 ] ] ; let n = type1 . length ; let m = type2 . length ; document . write ( FindIntersection ( type1 , n , type2 , m ) ) ;