Sequence of win streaks Languages

Sequence of win streaks

I'm trying to calculate a sequence of win streaks for a binary vector. Given a vectorI want to calculate the cumulative sum of ones with a "reset" every time there's a zero. So, in this case, the output of the function should be
Read More