InterviewDB Experience

Lamp Illumination Grid - Coding Interview

Interview Experience

Problem An N x N grid has lamps at given positions. Each lamp illuminates its entire row, column, and both diagonals. Given a list of query cells, for each query determine if the cell is illuminated, then turn off the lamp at that cell and all 8 adjacent lamps (if any). Example: Follow-ups How do you efficiently track which rows/columns/diagonals are lit? (counter maps per row, col, diag) What is the time complexity per query with your approach? Extend to lamps with a limited range (illuminates…

Full Details

🔒

Unlock all Codesignal questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a candidate experience report from a codesignal interview.

It covers the following topics: Q4, Coding, General Coding Assessment, Matrix .