I want to write a function that will detect and count the number of strings of consecutive 1's in a vector.

For example, if I have a vector of [01110011100], I am looking for a function that will give me an answer of 2, as there are 2 strings of consequetive 1s

## Best Answer