• Custom User Avatar

    ah so ALL of them must be at least 4. Thank you for helping me clarify that!

  • Custom User Avatar

    An array is called zero-plentiful if it contains at least one 0 and every sequence of 0s is of length at least 4

    There are 3 sequences of zeroes there and not all are of length at least 4.

  • Custom User Avatar

    log:

    [0, 2, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0]
    ['0000', '00000']
    2

    This array has 2 patterns matching and so the length of my array is 2.
    But I get an output of: 2 should equal 0.
    Why is this?

  • Custom User Avatar

    I've realized that some people would pass this without having this array give 0 as a result:
    [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0]
    It might be a good idea to include it in the test part.
    Sorry I'm still very new to coding and this site, I'm pretty aware that there might be a lot of methods for which this doesn't make any problem ;)