← 返回 bytedance 的题目列表Find Minimum Window Substring
类型:online_judge
Given two strings s and t , find the minimum window substring in s that will contain all the characters of t. If there's no such window, return an empty string. Note that when there are multiple possible answers, the earliest occurring one should be returned.
Input Format:
A string s, with a length not exceeding 10^5.
A string t, with a length not exceeding 10^5.
Output Format:
A string representing the minimum window substring.
Test Cases:
Input: s = "ADOBECODEBANC", t = "ABC"; Output: "BANC"
Input: s = "a", t = "a"; Output: "a".
Example
Input
12
ADOBECODEBANC ABC