← Flipkart questions

Minimum window containing all characters of pattern

Filed under Flipkart

Given two strings str and pat, find the minimum window in str that contains all characters from pat (including duplicates). If no such window exists, return an empty string.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Flipkart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.