Driver code
public static void Main ( String [ ] args ) { long [ ] arr = { 1 , 1 , 2 , 3 , 6 , 1 } ; List < long > v = new List < long > ( ) ; for ( int i = 0 ; i < arr . Length ; i ++ ) v . Add ( arr [ i ] ) ; int n = v . Count ; printMaxValPair ( v , n ) ; } }