Driver Code
int main ( ) { string arr [ ] [ 2 ] = { { "12:00 : AM " , "11:55 : PM " } , { "12:01 : AM " , "11:50 : AM " } , { "12:30 : AM " , "12:00 : PM " } , { "11:57 : AM " , "11:59 : PM " } } ; string P = "12:01 : PM " ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << countOverlap ( arr , N , P ) << endl ; }