Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.

2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

3. Student and Teacher User Guides |  Schemes of Work |   Real Teacher use Videos |


Join 36000+ teachers and students using TTIO.

Maths for Big O Notation

The complexity of an algorithm can be described by big O notation. Big O always assumes a worst case scenario. In big O is is customary to describe the input in terms of n rather than x. If we wanted to specify the complexity of an algorithm with a linear time complexity, we would say the time complexity is O(n).

Suggested Video

Additional Definition and Context

Big O notation is a notation used when talking about growth rates. It formalizes the notion that two functions "grow at the same rate," or one function "grows faster than the other," and such.

It is very commonly used in computer science, when analyzing algorithms. Algorithms have a specific running time, usually declared as a function on its input size. However, implementations of a certain algorithm in different languages may yield a different function. For example, an algorithm with input size n bytes, when implemented in C++, might take time n^2n2 microseconds; but when implemented in Python, it might take time 1000n^2 + 1000n1000n2+1000n microseconds due to it being a slower language.

Additional Reading

https://en.wikipedia.org/wiki/Big_O_notation

www.teachyourselfpython.com