Final step to store all the column number of 1 st and 3 rd cell upto MidRow
for ( j = Math . Min ( v [ i ] . Item1 , MidRow ) ; j <= Math . Max ( v [ i ] . Item1 , MidRow ) ; j ++ ) { s . Add ( new Tuple < int , int > ( j , v [ i ] . Item1 ) ) ; } } return s . Count ; } static void Main ( ) {