O-notation Factoids
Processing independent of n is called O(1) or constant time.
List search is O(n) where n is the number of nodes in the list.
Balanced binary tree search is O(logn) where n is the number of nodes in the tree.
Algorithms that have nested loops are generally O(nm) where n is the largest set being looped over and m is the degree of nesting.
O-notation is used to express both space & time requirements.
You can usually trade space for time.