# Tag: Maze

## Find shortest safe route in a field with sensors present

Given a rectangular field with few sensors present on it, cross it by taking the shortest safe route without activating the sensors.   The rectangular field is given in the form of M x N matrix and we need to find the shortest path from any cell in first column to any cell in the …

Read More Find shortest safe route in a field with sensors present

## Lee algorithm | Shortest path in a Maze

Given a maze in the form of the binary rectangular matrix, find length of the shortest path in a maze from given source to given destination. The path can only be constructed out of cells having value 1 and at any given moment, we can only move one step in one of the four directions.

Read More Lee algorithm | Shortest path in a Maze

## Find Longest Possible Route in a Matrix

Given a rectangular path in the form of binary matrix, find the length of longest possible route from source to destination position of the matrix by moving to only non-zero adjacent positions i.e. route can be formed from positions having their value as 1. Note there should not be any cycles in the output path.

Read More Find Longest Possible Route in a Matrix

## Find Shortest Path in Maze

Given a maze in the form of the binary rectangular matrix, find length of the shortest path in maze from given source to given destination. The path can only be constructed out of cells having value 1 and at any given moment, we can only move one step in one of the four directions.

Read More Find Shortest Path in Maze