DEV Community

Jordan Irabor
Jordan Irabor

Posted on


Explain Time Complexity Like I'm Five

Guys, no better way to put this, I'm having an exam in about an hour and I want to be certain I have this thing figured out.

Quick responses would be appreciated :)

Thank you!

Top comments (1)

jvanbruegge profile image
Jan van Brügge

I wrote an article about this in fact:

Basicly assuming you slice time in slices of fixed (!) width, how many slices do you need depending on the size of input (n).
O(1) means that no matter how big the input is, you only need a fixed amount of time. O(n) means you need as many slices as there are inputs (so bigger inputs mean longer run time) and so on.

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git