May 2019
Intermediate to advanced
698 pages
17h 21m
English
There are only a few aspects that change the complexity of an algorithm, those that have been shown to proportionally increase the total time required of an algorithm.
These are as follows:
If a piece of code only does one of these operations, it is one step, that is, O(1), and whenever there is a choice (if or match), the more complex branch has to be picked. Regardless of any input parameters, it will be the same number of steps—or constant time. If they are run in a loop, things get more interesting.
Read now
Unlock full access