Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 1 , 3 , 5 , 7 , 6 , 5 , 4 , 1 ] NEW_LINE Q = [ [ 0 , 3 ] , [ 3 , 4 ] , [ 2 , 4 ] ] NEW_LINE N = len ( arr ) NEW_LINE M = len ( Q ) NEW_LINE findAPSequence ( arr , N , Q , M ) NEW_LINE DEDENT