Practice Minimum Window Substring
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
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. Follow up: Could you find an algorithm that runs in O(m + n) time?
Source: Minimum Window Substring on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "ADOBECODEBANC", t = "ABC"
"BANC"
# Example 2
s = "a", t = "a"
"a"
# Example 3
s = "a", t = "aa"
""
Constraints
Related LeetCode Problems
Practice more problems similar to Minimum Window Substring.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.