Check if one string is a subsequence of another | Atlassian Interview Question