Need some help to solve Very Dirty String problem.
Short Description:
Given three strings A, B and C. Find the longest common sub-sequence of A and B, which have C at-least once as a substring in it.
Input: There will be T test cases. For each test there will be three lines describing string A, B, and C.
Constraints: 1 ≤ T ≤ 100 1 ≤ |A|, |B|, |C| ≤ 100
My approach: I tried it using normal recursive LCS with extra another state pointing the index of string C i'm trying to match.
here is my code.
Sorry for my bad English.