Longest stretch without a repeated letter
What is the length of the longest contiguous substring of quantitativetrading that contains no repeated character?
Show hints (2)+
- Keep a window with no repeats and remember the last index of each letter.
- When a letter repeats, the left end jumps past its previous occurrence.
Answer
Reveal answer →Final answer
9
Create a free account to see the full worked solution and track your progress.
Interview format: Prop Trading