Permutation in a string
Mediumstringsliding windowhash map
Return true if b contains a contiguous part made of exactly the letters of a, in any order.
Example 1
Input: a = "ab", b = "eidbaooo" Output: true
ba is there.
Example 2
Input: a = "ab", b = "eidboaoo" Output: false
Constraints
- 1 ≤ a.length, b.length ≤ 10⁴
- Lowercase letters
Submit checks your solution against 9 tests, including hidden ones.
/**
* @param {string} a
* @param {string} b
* @return {bool}
*/
function checkInclusion(a, b) {
}