Grassfire Algorithm
This path spreads like fire.
Last updated
This path spreads like fire.
Last updated
The destination cell is marked 0 and the adjacent cells are marked in an increasing number sequence until we reach the starting cell. These numbers indicate the minimum number of steps required to reach the destination cell from that current cell.
The computational complexity of this algorithm increases linearly with the number of cells. For example, if for a 2D grid of size 100 X 100 the compute time is , for a similiar grid of size 1000 X 1000 it would be
For more information view: