Redirecting to
NADOS

Distinct Transformations

1. You are given two strings S1 and S2.
2. You have to find the number of unique ways in which you can transform S1 to S2.
3. Transformation can be achieved by removing 0 or more characters from S1, such that the sequence formed by the remaining characters of S1 is identical to S2.
Input Format
Two Strings S1 and S2
Output Format
A number representing the count of distinct transformations.
Question Video
Constraints
1 <= length of strings S1 and S2 <= 1000
Sample Input
abcccdf
abccdf
Sample Output
3


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name