Recro interview question

DSA 2nd Question: String Subsequence Medium Level Question