Salesforce logoSalesforce
Coding·30 minMembers

Longest Subsequence of X That Is a Substring of Y

Members only

Second problem on Salesforce's SMTS HackerRank OA: given strings `x` and `y`, find the length of the longest subsequence of `x` that also appears as a contiguous substring of `y`.

SWE
string
dp
two-pointer
subsequence
medium
Frequency
Low
Last asked
2026-01-20
Stage
oa

Log in to continue reading the full content