Driver Code
int main ( ) { int arr [ ] = { 1 , 3 , 5 , 7 , 6 , 5 , 4 , 1 } ; int Q [ ] [ 2 ] = { { 0 , 3 } , { 3 , 4 } , { 2 , 4 } } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int M = sizeof ( Q ) / sizeof ( Q [ 0 ] ) ; findAPSequence ( arr , N , Q , M ) ; return 0 ; }