A Siemens Teamcenter integration receives a long text stream and must locate the shortest contiguous segment containing every character from a required token. Return the minimum-length window, preserving the original character casing and order.
Characters are matched exactly, so uppercase and lowercase letters are different. If a required character appears multiple times, the window must contain at least the same number of occurrences. If no valid window exists, return an empty string.
Implement min_cover_window(source, required).
source and required.source containing all characters in required, including duplicate occurrences.def min_cover_window(source, required):