Given two strings A and B you need to find the last occurrence ( 1 based indexing) of string B in string A.
first line of input contains of an integer 'T' denoting number of test cases
first line of each testcase contains String A.
Second line of each testcase contains String B.
for each case print an integer depicting the starting index of matched string ,corresponding to the answer .
print -1 if the string B is not Found in A.
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.