Utilitiy function to obtain maximum date or month or year
static int getMax ( int [ , ] arr , int n , int q ) { int maxi = int . MinValue ; for ( int i = 0 ; i < n ; i ++ ) { maxi = Math . Max ( maxi , arr [ i , q ] ) ; } return maxi ; }