I'm trying to solve a problem that I can't seem to wrap my head around and was hoping I could get a little bit of insight from someone more experienced than I am. Basically, I have an array that has anywhere from 10 to 500 values. These values are all either true or false, but they are in a random order. I need to know the greatest amount of times that false appears in a row. For example:
[false, false, true, false, true, false, true, false, false, false]
Should return 3, since it appears 3 times in a row at the most. This seems like a potentially common problem to solve but I couldn't find a solution through searching. Any help would be greatly appreciated!