Apple logoApple
CodingMembers

Substring Pattern Matches

Members only

Given a string s and a non-empty pattern pattern, return every starting index i in s where the substring s[i..i + pattern.length - 1] equals pattern.

SWE
medium
string
string-processing
Frequency
Single report · New
Last asked
2026-05-03
Stage
phone-screen

Log in to continue reading the full content