This question evaluates understanding of graph traversal and reachability in grid-based pathfinding, covering skills such as modeling a 2D grid as a graph, handling obstacles and boundary conditions, and algorithmic traversal strategies.
You control a character starting at a start cell and want to reach a target cell in a 2D grid. Some cells are blocked by obstacles and cannot be entered.
Given a grid of size m x n containing:
The character may move one step at a time in 4 directions (up, down, left, right) and must stay within the grid.
Return whether it is possible to reach 'T' starting from 'S'.