SE
Find the median by sorting
simulation
C++ STL map
Ad hoc, read problem carefully
Greedy
Ad hoc, C++ STL map
Newton method to solve equation
Factorize, sort all divisors
Counting sort, T(n) = O(n)
Sort on last name, ad hoc