DEV Community

Cover image for Big-O Explained
Jacob Clark
Jacob Clark

Posted on

19 2

Big-O Explained

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (5)

Collapse
 
cclaudiu24 profile image
cclaudiu

how come this expression evals to false: "n 2 <= 1 * 4 for 1 > 0, we can see that this is now false" ?

also if chose for O(n^2) case c to be 1 then why do you write it as 3?
"3<=3*3^2, for 3>0 which is true, but the truthy applies also to 1st expression where you say it s falsy..

Collapse
 
rubyandcoffee profile image
Alexandra Wolfe

Great article, thank you for writing!

Collapse
 
zasuh_ profile image
Žane Suhadolnik

Thank you for the explanation and the links for further reading.

Collapse
 
fernandosendmail profile image
Fernando

Really clear examples, this is great starting point on the whole theory of algorithm complexity, thanks for sharing this 👍

Collapse
 
jess profile image
Jess Lee

Thank you for breaking down Big O - such a popular topic in bootcamps! I can see it being used as a go to resource for a lot of new developers.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay