Longer Contiguous Segments of Ones than Zeros Problem

Longer Contiguous Segments of Ones than Zeros Problem — ExecCode Easy DSA Practice

Solve the Longer Contiguous Segments of Ones than Zeros problem on ExecCode. Free online easy DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.

Description Given a binary string s, return true if the longest contiguous segment of 1's is strictly longer than the longest contiguous segment of 0's in s, or return false otherwise. For example, in s = "110100010" the longest continuous segment of 1s has length 2, and the lon…

Practice Longer Contiguous Segments of Ones than Zeros free on ExecCode. Browse more ExecCode DSA problems.