I was doing this question.
http://www.codechef.com/problems/LWS
Finding longest weird subsequence.
My approach is to first find LIS and then LDS from the remaining string.
I know that this approach is wrong, but please anybody explain me why ??
I tried to find a counter example but failed.
Thank You.