Driver code
int main ( ) { string arr [ ] = { " aba " , " baba " , " aba " , " xzxb " } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; string q [ ] = { " aba " , " xzxb " , " ab " } ; int m = sizeof ( q ) / sizeof ( q [ 0 ] ) ; answerQueries ( arr , n , q , m ) ; return 0 ; }