Before attempting to code, I have one question that needs clarification.
“In other words, sequence s can be obtained from the a by deleting some elements.”
Is “some” here necessary? In other words, are the sub-sequences proper subsets meaning that we need to delete AT LEAST one element?
You can deduce the answer to this from the second example case perhaps, but I thought this should be explicitly stated.