← Salesforce questions
CodingReported in a candidate post, Feb 2025

Longest string that is a subsequence of s1 and a substring of s2

Filed under Salesforce

Given two strings s1 and s2, return the length of the longest string s3 such that s3 is a subsequence of s1 and a contiguous substring of s2.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Salesforce questions

Collected from public candidate posts and coding forums. Updated Nov 2026.