Exponential Time7:58 with Pasan Premaratne
A class of algorithms we likely won't work with but are fun to explore are those with exponential runtimes.
At approximately 4:38 in the video, instead of reading 2E20 as "two raised to the 20th power", the statement from the instructor should have been "two followed by 20 zeroes".
Polynomial runtimes - O(n ^ k): An algorithm is considered to have a polynomial runtime if, for a given value of
n, it's worst case runtime is in the form of n raise to the k power. Examples of this are
O(n^3). Algorithms with polynomial runtimes are considered efficient.
Exponential runtime - O(k^n): A runtime where number of operations increases exponentially as the size of the data set increases. Exponential runtimes are considered inefficient.
Combinatorial or factorial runtime - O(n!) - Runtimes where as the size of
n increases the number of operations increases by
n! is the factorial of
You need to sign up for Treehouse in order to download course files.Sign up