Find the smallest substring containing all characters of another string.
Unlock detailed company stats for this questionUpgrade
Given two strings, find the smallest substring of the first string that contains all the characters required by the second string, including their frequencies.
Example: string 1 "timetopractice", string 2 "toc" -> "toprac".
Format · Technical round.
Community answers
No answers contributed by the community yet.
Related questions
Find the shortest contiguous substring of a sentence containing all words of another string.Find the largest square in a grid of characters containing all the same character.Find the shortest subsequence of a cyclic string S that contains all characters of a pattern k.Related courses

Course

Course
Course
