Tag Archives: min substring with all chars

Minimum Substring of S Containing Elements in T

Given a random string S and another string T with unique elements, find the minimum consecutive sub-string of S such that it contains all the elements in T. For example: S=adobecodebanc T=abc answer=’banc’ The problem is similar to find all anagram of a string as substring of another given string. Please read my previous article here to […]