


For the given string “CodingNinjas”: “Ninja” is a substring while “dinas” is a subsequence.
The first line contains a single integer ‘T’ denoting the number of test cases, then each test case follows.
The first line of each test case contains the string ‘S’.
The second line of each test case contains the string ‘T’.
For each test case, print the substring of minimum length such that.
Output for each test case will be printed in a separate line.
You are not required to print anything; it has already been taken care of. Just implement the function.
1 <= S <= 1000
1 <= T <= 100
Time limit: 1 sec
We will find the window where we can actually find the whole string ‘T’. Then after that, since we have to return the minimum length window, we will try to shrink this window as much as possible.
The steps are as follows :
^(i) ^(j)
^(i) ^(j)