So, I’ve understood how the problem is to be solved i.e it is version of LCS with some additional constraints. But I’m not able to understand what decisions we need to make at each step in the recursive function?
According to me, if our current characters are equal, we need to consider whether they are extending an existing sequence or they are part of the first segment.
But it seems wrong… I’m not able to understand the logic. Can someone please explain to me the decisions we need to make at each step and any additional constraints we need to check before we take that decision?