TRAINING CATEGORIES
TRAINING PROGRAMS
Problem Statement:
Given two strings P and Q, find the count of distinct occurrences of Q in P as a subsequence.
Input:
P = banana, Q = ban
Output:
3 Q appears in P as below three subsequences. [ban], [ba n], [b an
3
Q appears in P as below three subsequences.
[ban], [ba n], [b an
We use cookies to make interactions with our websites and services easy and meaningful. Please read our Privacy Policy for more details.