| RECURSION & EXHAUSTIVE SEARCH (programmed in 1994) |
| MINES.C |
This C program tries to find the mines located on a map. The rule of the input map is that :
map contains positive numbers which are equal to the number of mines around that number's position
including the position of the number. (Just like minesweeper)
|
| Example : |
Input given to the program |
Original mine locations |
3 4 2 1 2 2
3 5 3 2 3 3
2 4 3 3 3 3
1 3 3 4 3 3
2 4 4 4 2 2
2 4 4 3 1 1
|
x . . . . x
x x x . . x
. . x . . x
. . . . x .
. x x . x .
. x x . . .
|
| NOTE : |
This program can be very handy to start with if you want to get into recursion and exhaustive search.
|