Solutions

#2 has two approaches, #3 could be tweaked further, #5 is similar to the
solution in the book.