wes d2a2ba9e15 first commit před 4 roky
..
README.md d2a2ba9e15 first commit před 4 roky
code.cpp d2a2ba9e15 first commit před 4 roky
unitTest.cpp d2a2ba9e15 first commit před 4 roky

README.md

Longest Sequence of Consecutive Zeroes

by Helen Yu tags: strings, loops, language_fundamentals

Summary

Write a function that returns the longest sequence of consecutive zeroes in a binary string. Examples longestZero("01100001011000") ➞ "0000" longestZero("100100100") ➞ "00" longestZero("11111") ➞ "" Notes If no zeroes exist in the input, return an empty string.

Instructions

Write a function that returns the longest sequence of consecutive zeroes in a binary string.

Examples

longestZero("01100001011000") ➞ "0000"

longestZero("100100100") ➞ "00"

longestZero("11111") ➞ ""

Notes

If no zeroes exist in the input, return an empty string.