You are given a digit string s.
A string is called semi repetitive if there is at most one adjacent pair of identical digits within it.
Return the length of the longest semi repetitive substring found in s.
Constraints:
s.length
'0' s[i] '9'
You are given a digit string s.
A string is called semi repetitive if there is at most one adjacent pair of identical digits within it.
Return the length of the longest semi repetitive substring found in s.
Constraints:
s.length
'0' s[i] '9'