3 ms·
You probably want to use BFS. For a large rectangular region starting in the bottom right, this solution uses 1 stack frame per cell in the region.
by anonymoushn 6y ago
You probably want to use BFS. For a large rectangular region starting in the bottom right, this solution uses 1 stack frame per cell in the region.