![]()

Gray blocks represent dead ends (value = 0) and path can be traced only using the white path (value = 1).
The binary matrix representation of the above maze (a) is given as
{1, 0, 0, 0}n{1, 0, 0, 0}n{1, 1, 1, 1}n{0, 0, 0, 1}nThe highlighted lines in (b) show the path to reach the destination from the source.
Click here to learn more about FACE Prep PRO1. If the destination point is reached,
2. Else
@@coding::1@@
Click here to learn more about FACE Prep PRORecommended Programs