Driver code
public static void Main ( String [ ] args ) { int n = 5 ; List < int > A = new List < int > ( ) ; List < int > B = new List < int > ( ) ; A . Add ( 4 ) ; A . Add ( 8 ) ; A . Add ( 2 ) ; A . Add ( 6 ) ; A . Add ( 2 ) ; B . Add ( 4 ) ; B . Add ( 5 ) ; B . Add ( 4 ) ; B . Add ( 1 ) ; B . Add ( 3 ) ; Console . Write ( getPairs ( A , B , n ) ) ; } }