How do I find a maximum number of consecutive non-zero values in the array?

Isn’t the function supposed to be looking for maximum runs of non-zero values? If so, then [0, 0, 1, 0] should give us a 1. Maybe we need clarification from @batmm.

2 Likes