BNY Interview Question

Asked about the subsequence question