A cubic algorithm is one where the number of steps increases as a cube of N, or N3.
An exponential algorithm is one where the number of steps increases as the power of a base, like 2N.
Exponential algorithms are astronomical in the number of steps required. Such algorithms are avoided when possible, and for even moderate values of N they may be so prohibitively slow as to be unusable. For example, if an algorithm was O(2N) and it took 1 millisecond to complete when N is 10, it would take 290 milliseconds or 3.93 x 1016 years to complete when N is 100.
Last modified: January 24, 2024
Back to Quadratic Algorithms, O(n^2)