Minimum Window Subsequence
A hard-tier problem at 44% community acceptance, tagged with String, Dynamic Programming, Sliding Window. Reported in interviews at eBay and 0 others.
Minimum Window Subsequence is a hard string problem that shows up in eBay interviews and looks deceptively simple until you realize the brute force approach times out. You're given two strings and need to find the shortest substring in the first that contains all characters of the second as a subsequence, in order. The 43% acceptance rate reflects candidates who nail the two-pointer or DP patterns and those who don't. This is exactly the kind of problem where you blank during the live OA and lose 30 minutes to a suboptimal approach. StealthCoder solves it in seconds if you hit it under pressure.
Companies that ask "Minimum Window Subsequence"
Minimum Window Subsequence is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe trick is realizing this isn't a classic substring search. You need a substring from string S that contains all characters of T as a subsequence, not a substring of T itself. The gotcha: greedy left-pointer movement doesn't work because you have to respect the subsequence order. The real pattern is two-pointer with dynamic programming or careful window management. Many candidates try to shrink the window after finding a valid range, but the order dependency means you can't just skip characters. You either need to precompute positions using DP, or use a two-pointer scan where you track which character in T you're matching. eBay likes this problem because it tests whether you understand the difference between substring and subsequence under time pressure. If the obvious approach fails and you're running out of time in the assessment, StealthCoder surfaces the working DP recurrence or pointer strategy instantly.
Pattern tags
You know the problem.
Make sure you actually pass it.
Minimum Window Subsequence recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Minimum Window Subsequence interview FAQ
Is this really asked at eBay or just an old report?+
eBay appears in the data for this problem. Acceptance is 43%, so it's not a gimme. It's the kind of medium-hard problem that filters out candidates who haven't practiced DP on strings or tested their two-pointer skills on non-obvious constraints.
What's the core trick I'm missing if I can't solve it?+
Most candidates conflate this with substring or use greedy shrinking without respecting subsequence order. The pattern is either DP to precompute positions of characters, or two-pointer where you advance through T and track the minimum window in S that covers each character match. Order matters.
How is this different from other string DP problems?+
Classic string DP like edit distance compares two full strings. This one asks for a substring property, so you're minimizing window length while maintaining a subsequence constraint. It merges sliding window intuition with DP state tracking, which throws people off.
Should I know this before the OA or is it OK to see it cold?+
Seeing it cold is risky given the 43% acceptance. If you've drilled sliding window and DP separately but not together, you'll likely find the pattern under time pressure. If not, you're vulnerable. This is a hedge case for StealthCoder.
What's the time complexity I should aim for?+
Optimal is O(m*n) or O(m+n) depending on approach, where m and n are string lengths. Brute force substring checks with subsequence validation is much slower. eBay expects you to avoid quadratic or worse. DP with single pass or two-pointer is the bar.
Want the actual problem statement? View "Minimum Window Subsequence" on LeetCode →