While doing problemsets on dp I came across this 1200 rated question whose name is 'Alternating Subsequence' and it was asked in codeforces round 636 , div 3 C. Question code is 1343 C and link to the problem is https://codeforces.net/problemset/problem/1343/C
In its third sample testcase the sequence given is -2 8 3 8 -4 -15 5 -2 -3 1 and we have to choose the maximum length alternating subsequence , which should be -15,5,-2 . But the answer given to it is according to subsequence -2 8 , which is not the longest subsequence and hence do not fulfill the requirements of question.
I checked the announcements and questions asked about this problem in live contest(which I did not give) , but couldn't find anything . And as a newbie , I don't know where to ask questions like this .
Please help me or guide me where can I ask and clarify my doubt.
I think you should read the definition of subsequence. In subsequence, elements don't have to consecutive