As reported: ServiceNow Staff Software Engineer loop, round 3 — an extra problem-solving round added because the design round's feedback was mixed — Feb 2026: Jump Game II and this problem.
Given strings s1 and s2, return the shortest contiguous substring w of s1 such that s2 is a subsequence of w. If there is no such window return ""; if several shortest windows exist, return the one with the leftmost start.
This is LeetCode 727 — Minimum Window Subsequence.
Example
s1 = "abcdebdde", s2 = "bde" -> "bcde"
s1 = "jmeqksfrsdcmsiwvaovztaqenprpvnbstl", s2 = "u" -> ""
Constraints: 1 ≤ s1.length ≤ 2 · 10^4; 1 ≤ s2.length ≤ 100; lowercase letters.
Code runner format: line 1 s1, line 2 s2. Implement minWindow(s1, s2); the harness prints the window.