Driver code
public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 2 , 2 , 3 , 4 , 4 , 5 , 6 } ; int n = arr . Length ; List < List < int > > myList = new List < List < int > > ( ) ; myList . Add ( new List < int > { 1 , 3 , 5 } ) ; myList . Add ( new List < int > { 1 , 2 , 4 } ) ; myList . Add ( new List < int > { 1 , 1 , 2 } ) ; myList . Add ( new List < int > { 2 , 1 , 7 } ) ; myList . Add ( new List < int > { 1 , 1 , 2 } ) ; SolveQuery ( arr , n , myList ) ; } }