Function to find the length of the longest subsequence such that no two adjacent elements are equal
def longestSubsequence ( N , Q , arr , Queries ) : NEW_LINE INDENT for i in range ( Q ) : NEW_LINE DEDENT