👩💻 Join our community of thousands of amazing developers!
2730. Find the Longest Semi-Repetitive Substring You are given a 0-indexed string s that consists of digits from 0 to 9. A string t is called a semi-repetitive if there is at most one consecutive pair of the same digits inside t. Return the length of the longest semi-repetitive substring inside s. A substring is a contiguous non-empty sequence of characters within a string. ...