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