Strings

Minimum Window Substring

hard
Given two strings `s` and `t` of lengths m and n, return the minimum window substring of `s` such that every character in `t` (including duplicates) is included in the window. If there is no such substring, return the empty string `""`. The testcases will be generated such that the answer is unique. Example: `minWindow("ADOBECODEBANC", "ABC")` → `"BANC"`.
Hint steps(0/3 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.

  3. 3

    Complete previous step or reveal to unlock this hint.