give the linear search complexities
worst O(n) best O(1) average O(n) space O(1)
give the binary search complexities
worst O(log n) best O(1) average O(log n) space O(1)
define big O
f(n) is O(g(n))
if there exists n_0 >= 1, c > 0 such that
f(n) <= cg(n)
for every n >= n_0
give the complexities from worst to best
n^n n^2 n log n n log n 1