eli5: What does Big Oh, Big Omega, and Big Theta mean in algorithm?

185 views

eli5: What does Big Oh, Big Omega, and Big Theta mean in algorithm?

In: 0

3 Answers

Anonymous 0 Comments

Big Oh (BOh) is a way to describe how long it takes for an algorithm to solve a problem when the input size is very large. Say an algorithm takes 10 seconds to solve a problem when the input size is 100 but it takes 30 seconds to solve the same problem when the input size is 1000 we would say that the algorthm has a BOh of 30 seconds.

Big Omega (BOm) is similar to BOh but it describes how long it takes for an algorithm to solve a problem when the input size is very small. So if an algorithm takes 10 seconds to solve a problem when the input size is 100, but it only takes 5 seconds to solve the same problem when the input size is 50, we say that the algorithm has a BOm of 5 seconds.

And finally, Big Theta (BTh) describe how long it takes for an algorithm to solve a problem when the input size is very large AND very small. If an algorithm has a BTh of 10 seconds it means that it takes about 10 seconds to solve the problem no matter how big or small the input size is.

In an ideal world we want algorithms to have a small BOh, BOm, and BTh because that means they will solve problems quickly regardless of input size.

You are viewing 1 out of 3 answers, click here to view all answers.