Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
With different algorithms performing different kinds of operations how do we figure out which algorithms are more efficient than others? In this video let's talk about Big O notation.
Glossary
- Order of growth - a measure of how much the time taken to execute operations increases as the input size increases
- Big O - a theoretical definition of the complexity of an algorithm as a function of the size
Resources
Runtime Data
Listed below are the data points used to plot the runtime graphs seen in the video
Linear Search
n | Worst case runtime |
---|---|
10 | 10 |
100 | 100 |
1000 | 1000 |
10000 | 10000 |
100000 | 100000 |
1000000 | 1000000 |
Binary Search
n | Worst case runtime |
---|---|
10 | 4 |
100 | 7 |
1000 | 10 |
10000 | 14 |
100000 | 17 |
1000000 | 20 |
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up