Challenges

All done except 3, although a solid attempt was made without asking for
any help online.
# 4 needs obvious speed improvements using memoization