I have some arrays and I want to count the number of sequences of zeroes in the array.
For example:
A [0][0][1][1][1][0][0][0][2][2][2][2][0][0][0]
would return 3 sequences
How can I do this efficiently?
Edit: the language I am interested in using to solve is
Javascript