← Google questions
CodingMediumReported in a candidate post, Jul 2025

Pattern searching in strings

Filed under Google

Given a text string txt and a pattern string pat, find all starting indices in txt where pat occurs as a substring (occurrences may overlap). Return the indices in increasing order, or an empty list…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.