Facebook | Phone Screen | Minimum Window Substring

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2019-10-29Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Given a string as a "source" string, find the smallest substring of source such that it contains all characters in "search" string (which contains distinct characters).

For example, for search string ['a','b','c'], source string "aefbcgaxy", the shortest string is "bcga".

Comments