Given a 1-D array of daily activity flags (1 = active, 0 = not), return the length of the longest streak:
Input
[1 1 0 1 1 1 0 1]
Output
3
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)