Round 1
Questions:
Given two strings s1 and s2, find till how many days s2 is a subsequence of s1 if on every day we delete all the strings in s1 from start to end inclusive.
Example:
s1 = abcdefghabc
s2 = abc
start = [0, 0, 1, 2, 9]
end = [1, 2, 3, 3, 10]
Answer = 4 days.
Candidate's Approach
I thought of maintaining indices for every letter and when they come in the start to end range, remove them and see if we aren't left with any indices, but couldn’t pass all test cases.
Interviewer's Feedback
No feedback provided.