Subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements
Example : abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, … etc are subsequences of “abcdefg”
Substring of a string S is another string S that occurs “in” S.
Example : “the best” is a substring of “It was the best of times”.
There is a minor difference What you are referring to is substring but the problem says subsequence.
I actually whent throught this Article : Shortest Common Supersequence and was baffled when my code didn’t pass the testcases.
###PS: Geeks4Geeks is really helpful for Hard Problems and Competitive Programming