Repetitions
Published in
Jul 7, 2022
You are given a DNA sequence: a string consisting of characters A, C, G, and T. Your task is to find the longest repetition in the sequence. This is a maximum-length substring containing only one type of character.
Input
The only input line contains a string of n characters.
Output
Print one integer: the length of the longest repetition.
Example
Input:ATTCGGGA
Output:3
If you want a code, then please checkout this github repository.