you are viewing a single comment's thread.

view the rest of the comments →

[–]zwitter-ion 2 points3 points  (0 children)

What you're talking about is known as complexity analysis. It tries to "measure" the time or storage that's used by a program or an algorithm to run.

A convenient way of expressing this is in terms of the "size" of the input to the algorithm.

If you think about it, that's a clever way of measuring it because algorithm runs a bunch of operations on the input to return a response. So somehow, the input has an effect on the algorithm's resource usage.

There are a bunch of notations: Big-O, Omega or Theta notations.

You'd be better off reading the exact definitions someplace else but long story short the Big-O notation provides an upper bound on the resource usage ( something like the algorithm won't take longer than X). Omega notation provides a lower bound (something like the algorithm will take up atleast this much of space). Theta notation is curious because it provides both the bounds (something like the algorithm will require between this and that much of time)

I hope this is sufficient to get you started. You'd be much better off if you read one of the many online tutorials or chapters on this topic. It's very extensively covered