Max Consecutive Ones — LeetCode

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

Problem

Please click the link below to view the Problem Statement

Solution

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!

Conclusion

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!

Sources:

https://leetcode.com/problems/max-consecutive-ones/,

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max,

https://www.youtube.com/watch?v=auZoRYkbWbo

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Layering GraphQL on top of REST

Create Helpdesk Custom Contact Form in Opencart

Exporting Pandas DataFrames — Write Your Own Utility Functions in Python

Disproving Gavin Wood’s FUD against Avalanche

Quality of Open Source Software: how many eyes are enough?

Updating your app for the iPhone X

How to Plan for Your Next Web App?

Building my phase 3 project

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Stephanie Segura

Stephanie Segura

More from Medium

Leetcode Solutions

Interview Questions For Developers To Ask Potential Employers

Leetcode 862. Shortest Subarray with Sum at Least K

Minimum cost to reach the top