Recently I have come across this question for an interview preparation:
Given an integer array, you are allowed to reverse at most one subarray [l,r] in it. Find the maximum length of longest increasing subsequence.
Has anyone seen this question in any online judge before? I am looking for a place to test out my algorithm.