[LeetCode] 2257. Count Unguarded Cells in the Grid - Python
·
알고리즘/LeetCode
난이도: Medium 문제 설명You are given two integers m and n representing a 0-indexed m x n grid. You are also given two 2D integer arrays guards and walls where guards[i] = [rowi, coli] and walls[j] = [rowj, colj] represent the positions of the ith guard and jth wall respectively.A guard can see every cell in the four cardinal directions (north, east, south, or west) starting from their position unless ..