A function to do counting sort of arr [ ] according to given q i . e . ( 0 for day , 1 for month , 2 for year )
void sortDatesUtil ( int arr [ ] [ 3 ] , int n , int q ) { int maxi = getMax ( arr , n , q ) ; int p = 1 ; while ( maxi > 0 ) {