Given two strings A and B, find if A is a subsequence of B.
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains two space separated strings A and B.
For each test case, in a new line, print 1 if a is sub-sequences of b else print 0.
1 <= T <= 900
1<= |A|,|B| <=104
Input: A = "axy", B = "yadxcp"
Output: 0 (A is not a subsequence of B)
Input: A = "gksrek", B = "geeksforgeeks"
Output: 1 (str1 is a subsequence of str2)
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.