Available question text
Given s1, s2 and repetition counts n1, n2, find the maximum m such that s2 repeated m (i.e., [s2, m]) can be obtained as a subsequence of s1 repeated n1 — equivalently, how many full copies of s2 you can sequentially extract from the concatenated s1's. The core challenge is to handle large n1/n2 (up to 1e6) efficiently by simulating subsequence matching and detecting repeating states/cycles.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 466. Count The Repetitions
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source