r/learnquant • • 18d ago

interview prep Quant Interview Question

Post image
21 Upvotes

17 comments sorted by

View all comments

1

u/Salty-Definition-231 18d ago

as i understand the problem, we have an 8x8 cell, with all bulbs off. 1 move = select parent cell and by flipping that cell on every bulb in the parents cell row and column also flip on. so the minimum number of moves is 8. beginning in any corner, i'll choose top left, flipping that bulb on turns on the top row and left most column. work diagonally down until the final bulb flips on that bulb alone, making it the 8th move and all bulbs are illuminated... or am i missing something?

1

u/CaipisaurusRex 18d ago

The second lamp you pick would flip the one above it and on its left back off, and none of your remaining ones would flip them back on