text: Function to find the length of the longest subsequence such that no two adjacent elements are equal
code: void longestSubsequence ( int N , int Q , int arr [ ] , int Queries [ ] [ 2 ] ) { for ( int i = 0 ; i < Q ; i ++ ) {