TweakCode
Optimization lessons
Loading editor…
Test casesRun to compare output
Input
s = "ababcbacadefegdehijhklij"
Output
—
Expected
[9,7,8]

More practice

Same technique, different problems. Try them without the walkthrough.