You are coding as a Guest. Sign in with your RoleNest account to permanently track your streak, earn XP, and climb the Campus Leaderboard!
Sign In with RoleNestProblem Set
🔥Minimum Window Substring: Frequency Constrained WindowHard
SUPER HARD PROBLEM OF THE DAY+150 XP • FAANG OA TIER
High-difficulty challenge matching authentic Google, Amazon & Uber L5 online assessment conditions.
HardSliding Window•Acceptance: 42.8%
Minimum Window Substring: Frequency Constrained Window
Targeted in FAANG & Tech OA:GoogleAmazonMicrosoft
Real-World Engineering Context
Used in streaming network packet sniffers (Wireshark) and security SIEM log parsers (Splunk) to detect intrusion exploit signatures within payload streams.
Given two strings `s` and `t` of lengths `m` and `n` respectively, return the minimum window substring of `s` such that every character in `t` (including duplicates) is included in the window. If there is no such substring, return the empty string `""`.
The testcases will be generated such that the answer is unique.
Sample Test Cases
Input: ["ADOBECODEBANC","ABC"]
Expected: "BANC"
Input: ["a","a"]
Expected: "a"
Input: ["a","aa"]
Expected: ""
Constraints
- m == s.length
- n == t.length
- 1 <= m, n <= 10^5
- s and t consist of uppercase and lowercase English letters.
Recruiter Fast-Track ReferralVerified Candidate
Direct pipeline to Google, Amazon, Microsoft, Swiggy, & Uber recruiters
Top DevScore profiles bypass resume screening filters. Every verified problem solve writes authentic proof-of-work to your profile and dispatches you directly into employer inboxes on RoleNest.
Explore 5,000+ Direct ATS Openings on RoleNest ↗✓ Direct Referral Active
Language:
Ready to test. Click Run Code or Submit Solution to run test cases in isolated browser sandbox.