Appleseniormar. de 2026
Given two strings `input` and `pattern`, return `true` if `pattern` contains a permutation of `input` as a substring. In other words, return true if any anagram of `input` appears as a contiguous substring in `pattern`.
Check whether any substring of s2 of length |s1| is a permutation of s1 (i.e., has the same character multiset). The core challenge is to do this efficiently—typically via a sliding-window with constant-size (26-letter) frequency comparisons for strings up to length 10^4.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Given two strings `input` and `pattern`, return `true` if `pattern` contains a permutation of `input` as a substring. In other words, return true if any anagram of `input` appears as a contiguous substring in `pattern`.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.