Minimum Window Substring
Given two lowercase alphabet strings a and b, return the length of a minimum substring in a that contains all the characters of b.
If no such substring exists, return -1.
Constraints
0 ≤ n ≤ 100,000wherenis the length ofa1 ≤ m ≤ 100,000wheremis the length ofb
https://binarysearch.com/problems/Minimum-Window-Substring
Examples
Example 1
Input
- a =
qthequickbrownfox - b =
qown
Output
- answer =
10
Explanation
The shortest substring that contains “qown” is “quickbrown” which has length of 10.
Leave a comment