Driver code
static void Main ( ) { List < List < int > > matrix = new List < List < int > > { new List < int > { 2 , 4 , 6 } , new List < int > { 8 , 10 , 12 } , new List < int > { 14 , 16 , 18 } , new List < int > { 20 , 22 , 24 } , } ; int n = matrix . Count ; int m = matrix [ 0 ] . Count ; int k = 2 ; Console . Write ( minOperations ( n , m , k , matrix ) ) ; } }