I agree (or if I am under 13 my parent or guardian agrees on my behalf) to the terms and conditions of use and that: - My test statistics may be published on the site leaderboard against my username - My teacher(s) can review my test scores - I can receive feedback on my tests from my teacher(s)
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.
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).
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.