Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 239 Bytes

README.md

File metadata and controls

6 lines (5 loc) · 239 Bytes

Longest Substring with At Most Two Distinct Characters

Given a string S, find the length of the longest substring T that contains at most two distinct characters. For example, Given S = “eceba”, T is “ece” which its length is 3.