Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Permutation in String

Given two strings s1 and s2, print true if s2 contains a permutation of s1 as a contiguous substring, otherwise false.

Constraints

1 <= len(s1), len(s2) <= 10^4 Lowercase English letters

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.