Available question text
Find the length of the longest contiguous substring of word that does not contain any string from forbidden as a substring; forbidden strings are short (≤10), so an efficient solution scans word while tracking the most recent index that yields a forbidden occurrence (checking only up to the max forbidden length).
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 2781. Length of the Longest Valid Substring
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source