586. Drake and Substrings
0
Hard
Drake came across a question on substrings. He was given two strings s and t of lengths m and n respectively, he has to print 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, print the empty string "".
But, however he is unable to solve this question hence you have to now help him in solving this question. The testcases will be generated such that the answer is unique.
But, however he is unable to solve this question hence you have to now help him in solving this question. The testcases will be generated such that the answer is unique.
Input Format
First Line contains String (s)
Second Line contains String (t)
Second Line contains String (t)
Output Format
String
Example
Input
ADOBECODEBANC
ABC
Output
BANC
Constraints
m == s.length
n == t.length
1 <= m, n <= 105
s and t consist of uppercase and lowercase English letters.
n == t.length
1 <= m, n <= 105
s and t consist of uppercase and lowercase English letters.
Loading...
View Submissions
Console