Max Consecutive Ones — LeetCode

Written by Stephanie Segura | May 22, 2021

Stephanie Segura
1 min readMay 22, 2021

Thank you for visiting this post! Be sure to also take a look at my other work on LinkedIn, Github, and my website.


Please click the link below to view the Problem Statement


The Math.max() function returns the largest of the zero or more numbers given as input parameters, or NaN if any parameter isn't a number and can't be converted into one.

— MDN Web Docs

I had some help solving this algorithm. Please check out Algo Byte on Youtube. She did an amazing job explaining how to tackle this!


Thank you so much for stopping by! Stay tuned for more Algorithm Content!

Please checkout my online portfolio and feel free to connect with me on Linkedin!