解題說明
C++ 解法
複雜度分析
虛擬碼
1. Build frequency map for t (need[]) 2. left=0, have=0, required=distinct chars in t 3. Expand right pointer: a. Add s[right] to window b. If s[right] is needed and window count meets need: have++ 4. While have == required: a. Update min window if smaller b. Remove s[left] from window, advance left c. If removal breaks a requirement: have-- 5. Return min window substring