Substring Pattern Matches
CodingPhoneMachine Learning EngineerReported Nov, 2025
Company question banks are included with the Insider plan.
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.
Return the indices in ascending...