Driver code
int main ( ) { int N = 3 ; int A [ ] = { 1 , 2 , 3 } ; int B [ ] = { 2 , 3 , 1 } ; cout << ( commonSubarrays ( A , B , N ) ) << endl ; N = 5 ; int C [ ] = { 1 , 2 , 3 , 4 , 5 } ; int D [ ] = { 2 , 3 , 1 , 4 , 5 } ; cout << ( commonSubarrays ( C , D , N ) ) ; }