Str with Longest Len
Microsoft interview question: Given a lowercase string S (1 ≤ |S| ≤ 1,000,000), find the length of the longest substring that is both a proper prefix and a proper suffix of S. This coding interview problem from Microsoft interviews focuses on string properties and handling large inputs, without requiring any specific algorithm details.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
