Having trouble wrapping my head around a particular issue and could use some insight from those with more experience. I am dealing with an array containing anywhere from 10 to 500 values, all either true or false but in random order. My goal is to determine the maximum consecutive occurrence of false within this array. For example:
[false, false, true, false, true, false, true, false, false, false]
Answer should be 3, as false appears three times consecutively at most. While it seems like a common problem, I have not been able to find a solution through my searches. Any assistance would be greatly appreciated!