Honeywell | OA | Coding Round | 2025 | Repeat
Question · Posted Apr 2026
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 nnn characters. Output Print one integer: the length of the longest repetition. Constraints 1≤n≤1061 \le n \le 10^61≤n≤106 Example Input: ATTCGGGA Output: 3
The full answer & interview discussion are available to premium members.
Log in Create a free account