Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1001. Grid Illumination
Given an n x n grid with some lamps that illuminate their entire row, column, and both diagonals, answer a sequence of queries asking whether a cell is illuminated and then turn off any lamp in the 3x3 neighborhood around that query. The challenge is to support up to 2e4 lamps/queries on a grid as large as 1e9 by efficiently tracking active lamps and aggregate illumination of rows, columns, and diagonals.
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.