Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 435 Bytes

File metadata and controls

13 lines (10 loc) · 435 Bytes

Problem 5: Permutation Subsequence (Permutation in String)

Problem Statement

Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, one of s1's permutations is the substring of s2.

Input Format

  • Two strings s1 and s2.

Example

Input: s1 = "ab", s2 = "eidbaooo"
Output: True Explanation: s2 contains one permutation of s1 ("ba").