As reported: Goldman Sachs rounds (2025–2026): on-campus summer analyst technical + HR round (about 10 minutes of DSA): given strings A and B, find the minimum-length substring of A containing all characters of B in any order — brute force
O(n²), then the sliding window, explained only; Java Associate Superday DSA round: a string problem like Minimum Window Substring (hash map + sliding window), called LeetCode-hard.
Given strings s and t, return the shortest substring of s that contains every character of t (including duplicates). Return "" if there is none. The answer is unique when it exists.
This is LeetCode 76 — Minimum Window Substring.
Example 1
s = "ADOBECODEBANC", t = "ABC"
-> "BANC"
Example 2
s = "a", t = "a"
-> "a"
Example 3
s = "a", t = "aa"
-> ""
Constraints: 1 ≤ s.length, t.length ≤ 10^5; English letters.
Code runner format: one JSON value per line: s, then t (LeetCode's test-case format). Implement minWindow(s, t); the harness prints the result as JSON.