Back to course home
0% completed
Vote For New Content
Minimum Window Substring (hard)
Problem Statement
Given a string s and t of length m and n respectively, find the smallest substring in a given string 's' that contains all the characters (including duplicate) of another string 't'. The order of characters in 't' doesn't matter, but the substring in 's' must include all characters of 't', possibly with additional characters.
If no such substring exists, return an empty string.
Examples
Example 1:
- Input: s = "xyyzyzyx", t = "xyz"
- Expected Output: "zyx"
.....
.....
.....
Like the course? Get enrolled and start learning!
On this page