https://practice.geeksforgeeks.org/problems/longest-alternating-subsequence/0