backtracking in haskell
- by dmindreader
I have to traverse a matrix and say how many "characteristic areas" of each type it has.
A characteristic area is defined as a zone where elements of value n or n are adjacent.
For example, given the matrix:
0 1 2 2
0 1 1 2
0 3 0 0
There's a single characteristic area of type 1 which is equal to the original matrix:
0 1 2 2
0 1 1 2
0 3 0 0…