  InterviewBit Academy is now Scaler Academy! # Two Strings

Given two string A and B consisting of lowercase English alphabets.
Consider all subsequences of A that are equal to string B.
You have to find whether each character(each index) of string A occurs in at least one of these subsequences.

Return 1 if each character(each index) of string s occurs in at least one of these subsequences, Else return 0.

Note: Yor solution will run on multiple test cases. Make sure to clear global variable each time.

Input Format

``````The only argument given is the integer array A.
``````

Output Format

``````Return 1 if each character(each index) of string s occurs in at least one of these subsequences, Else return 0.
``````

Constraints

``````1 <= |A| <= 100000
1 <= |B| <= 100000
``````

For Example

``````Input 1:
A = "abab"
B = "ab"
Output 1:
1
total possible subsequences in A that are equal to B
AA
AA
AA
All indexes occurs atleast once in all of these subsequences.

Input 2:
A = "abacaba"
B = "aba"

Output 2:
0
total possible subsequences in A that are equal to B
AAA
AAA
AAA
AAA
AAA
AAA

Index 3 does not occur in any of these subsequences.
``````
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details. 