#3090

Maximum Length Substring With Two Occurrences

pupil · 340 · lc easy +22 · 65.2% accepted · 255 likes · top 69%

Description

Given a string s, find the maximum length of a contiguous substring in which no character appears more than twice.

Code

1
2
3