Smallest Substring Of A String Containing All Characters Of Another String
hard
1. You are given two strings s1 and s2 containing lowercase english alphabets. 2. You have to find the smallest substring of s1 that contains all the characters of s2. 3. If no such substring exists, print blank string("").
Constraints
1 <= length of string s1 and s2 <= 10000
Format
Input
Two strings s1 and s2
Output
A string
Example
Sample Input
timetopractice
toc
Sample Output
toprac
Question Video