CodeMentor.
Ask AIProblemsLearnC++TCSCore CSHRProgress
0Lv 1
ProblemsSliding Window

Permutation in String

Medium
LeetCode
4/6
MediumSliding WindowLeetCode #567

Permutation in String

Fixed window of len(s1). Compare frequency maps / matches count.

Examples

Example 1

Input

ab eidbaooo

Output

true
Example 2

Input

ab eidboaoo

Output

false

Stuck? Take a nudge

C++17Autosaves