Solutions to textbook programming problems