Solution to problems of the book "Programming Challenges" by Steven S. Skiena and Miguel A. Revilla