text: Recursive function to find the length of the longest subsequence of pairs whose first element is increasing and second is decreasing
code: int longestSubSequence ( pair < int , int > A [ ] , int N , int ind = 0 , int lastf = INT_MIN , int lasts = INT_MAX ) {