← Back
00:00

Bounded Repeat Substring

Microsoft interview questions · Medium · Coding round · 6 tests

Readings from a sensor are given as a string s. Call a contiguous piece of s valid when nowhere inside it does the same character occur three times in a row.

Your function should report how long the longest valid substring is.

Function

Idle