Halloween Sale
Unlock all premium questions for over 30% off
Longest Proper Prefix And Suffix
Medium
Question
Some strings begin and end with the same run of characters. For s, measure how long that shared run can get when the copy at the front counts as a proper prefix and the copy at the back counts as a proper suffix. "Proper" means the piece must be shorter than s itself, so the whole string never counts as its own prefix or suffix.
...
Asked at:Microsoft
More Microsoft interview questions
- Minimum Flips for Symmetric Gridmedium
- Largest Square from Mixed Tilesmedium
- Maximize Edge Label Sum in Graphmedium
- Set Even Parity Biteasy
- Design Recent Files Trackereasy
- Build the Longest Spike Sequencemedium
- Lowercase Before Uppercase Letter Countmedium
- Minimum Adjacent Swaps for Ball Groupingmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.