Programming 1
Week 13: Exercises

1. Eight Queens Solver

Write a program that can search for a solution to the eight queens problem and print it in this form:

. . Q . . . . .
Q . . . . . . .
. . . Q . . . .

2. Counting Sundays

Solve Project Euler's problem 19.

3. Number Spiral Diagonals

Solve Project Euler's problem 28.

4. Showing the Path

Write a function that takes a 2-dimensional array of booleans representing a maze. There will be no wall in the upper-left or lower-right corner.

The procedure should print out the maze, indicating the shortest path from the upper-left corner to the lower-right corner. For example, the output might look like this:

..######
#.#    #
#.# #  #
#...#  #
## ....#
######..

If no such path exists, print the maze without any path.