Need idea: I thought of finding all possible increasing and decreasing subsequences which is too slow. Can this be done efficiently? Also according to me there can be at max 1 element in common in both the subsequences. I am not getting how to use this information.
Part of course:
Show admin stats