Tutorial by Examples

Functions that are O(n) increase the number of operations linearly, as the input gets very large. A simple example of a function that is O(n) would be the linear search algorithm, which runs once for the size of the input. The following pseudo-code would be O(n), because it will always be bounded ...

Page 1 of 1