Recursive function to find the length of the longest subsequence of pairs whose first element is increasing and second is decreasing
def longestSubSequence ( A , N , ind = 0 , lastf = - sys . maxsize - 1 , lasts = sys . maxsize ) : NEW_LINE