Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2257. Count Unguarded Cells in the Grid
Given an m x n grid with guards and walls, determine how many empty cells are not seen by any guard, where each guard observes cells in the four cardinal directions until blocked by a wall or another guard. Because m*n can be up to 1e5, the typical solution scans rows and columns (or uses linear passes) to mark visible cells efficiently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.