Skip to content
Get started

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)+
  1. Keep a window with no repeats and remember the last index of each letter.
  2. When a letter repeats, the left end jumps past its previous occurrence.

Answer

Reveal answer →

9

Create a free account to see the full worked solution and track your progress.

Interview format: Prop Trading

Related questions