Loading...
In computer vision, feature matching often requires finding the smallest region in an image that contains all required feature types.
Given a string features representing detected features in a scan line, and a string required containing all feature types that must be present, find the length of the smallest contiguous substring of features that contains all characters in required.
If no such window exists, return 0.
features = "ADOBECODEBANC", required = "ABC"
4
The minimum window is "BANC" which has length 4 and contains A, B, and C.