Find Longest Special Substring That Occurs Thrice I
For each letter, keep the three largest candidate run-based lengths; the third one is the answer for that letter.
For each letter, keep the three largest candidate run-based lengths; the third one is the answer for that letter.