Given two strings a and b print whether they contain any common subsequence (non empty) or not.
The first line contains an integer T denoting number of testcases. Each of the next T lines contains two strings a and b.
Print 1 if they have a common subsequence (non empty) else 0.
1<= |a|=|b| <=30
a and b consist of uppercase English letters ('A'....'Z')
AE is a subsequence of both the string so the answer is 1.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.