Menu
Coddy logo textTech

Longest Repeating Ones

Lesson 1 of 3 in Coddy's Interview Coding Challenges - Pack II course.

challenge icon

Challenge

Easy

You are given a signal as a string of zeros and ones, return the length of the longest sequence of ones.

 

Example,

Input:

0110111001011110000000011

Expected output:

4

Try it yourself

int getLongestRepeatingOnes(char* s) {
    // Write code here
}

All lessons in Interview Coding Challenges - Pack II

1Challenges

Longest Repeating OnesWith Error CorrectionWith Double Error Correction