Grassfire Algorithm
This path spreads like fire.
Last updated
Was this helpful?
This path spreads like fire.
Last updated
Was this helpful?
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.
For more information view:
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