Driver code
public static void Main ( ) { int N = 3 ; int [ ] A = { 1 , 2 , 3 } ; int [ ] B = { 2 , 3 , 1 } ; Console . Write ( commonSubarrays ( A , B , N ) ) ; Console . Write ( " STRNEWLINE " ) ; N = 5 ; int [ ] C = { 1 , 2 , 3 , 4 , 5 } ; int [ ] D = { 2 , 3 , 1 , 4 , 5 } ; Console . Write ( commonSubarrays ( C , D , N ) ) ; } }