 All Problems
Permutation in String
medium
sliding window
strings
microsoft
amazon

Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.

Example 1:

Input:
ab
eidbaooo
Output: true

Example 2:

Input:
ab
eidboaoo
Output: false

Input format: First line: s1. Second line: s2.

Output format: true or false

Run to check your code against the sample cases, or submit to run every case