Take a string
S of lowercase letters.
These letters form consecutive groupings of like characters.
Find groups with 3 or more like characters and return a list of lists of starting and ending index for each character group.
Elaboration and examples
If we show an example, we could say
S = "abbcccdeffffy".
This string has 2 groups,
f who’s consecutive characters are of 3 or more.
You need to return a list of lists with the starting and ending index, for the above example, this would be
Another example would be:
S = "nfjsaaaaaebbfbbbfennjheeeeej"
result = [[4,8],[13,15],[22,26]]
Writing some code