terminal
Elevo
/
ESC
Login
Initiate Registration
code
Topics
corporate_fare
Companies
history
History
arrow_back
Back to Challenges
#438
Find All Anagrams in a String
Medium
Acceptance 0%
Editorial
description
Problem Description
Given two strings `s` and `p`, return an array of all the start indices of `p`'s anagrams in `s`. You may return the answer in any order.
checklist
Constraints
1 <= s.length, p.length <= 3 * 10^4
s and p consist of lowercase English letters.
science
Examples
Case #1
In:
s = "cbaebabacd" p = "abc"
Out:
[0,6]
Case #2
In:
s = "abab" p = "ab"
Out:
[0,1,2]
Mastery Tags
Hash Table
Sliding Window
Strings
Hiring Companies
Amazon
Google
Meta
code
Integrated IDE
Python 3
expand_more
C
C++ 17
Java
JavaScript
Python 3
C
C++ 17
Java
JavaScript
Python 3
refresh
class Solution: def findAnagrams(self, s: str, p: str) -> list[int]: pass
Login to Compile
Processing
terminal
Debug Output
home
Home
extension
Practice
robot_2
login
Sign In
account_circle
Menu
code_blocks
Coding
psychology
Aptitude
Navigation
close
Login
Registration