How do I find the LIS,subsequence, with the constraint that I cant skip first and last element?
EDIT: What I actually meant was that I have to start from the beginning and end at the end.Also I want to extend this for a zigzag subsequence like Dynamic programming: Find longest subsequence that is zig zag