Count Secured Strings
In an Amazon security analysis task, two passwords have been generated, but they may be differ in length. One password is generated by a customer, and the other by an internal system. The customer wants to determine how many secured variations of the passwords exist module 10^9 + 7.
An secured variation of the passwords is defined as a subsequence of customer's password which is lexicographically greater than system generated password.
Formally:
The task is to count how many susequences of password s are lexicographically greater than password t. Since the answer can be large, return the result module (%) 10^9 + 7. More specifically, if result represents the required number of subsequences, then return the remainder when result is divided by 10^9 + 7.
Note
x[i] > y[i] at the first position where x and y differ. or|x| > |y| and y is a prefix of x (where |x| denotes the length of password x).๐ Thanks a jillion, spike! ๐
1Example 1

2Example 2

Constraints
Limits and guarantees your solution can rely on.
1 <= |s| <= 10^51 <= |t| <= 100s and tconsists of lowercase English letters.