1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
problem
defined by input and correct output
algorithm
stepwise procedure, terminates, produces correct output
correctness
efficiency
key issues:
1.
2.
Big O
f(n) <= cg(n) for all n >= n0
(O(g(n))
Big Omega
lower bounded (>=)
(Ω(g(n))
Big Theta
bounded above and below (=)
(θ(g(n))
Little o
strictly upper bounded (<)
o(g(n))
Little omega
strictly lower bounded (>)
(ω(g(n))
query
search, retrieval, range
updates
insert, delete, change
space
measured in words/bits
O(1)
a single operation is ____ time
ex: arr[i] = 5;
O(n)
a loop that runs n times is ____ time
O(n²)
a nested loop is ____ time
O(log n)
dividing by n each time is ____ time