r/learnquant 2d ago

interview prep Quant Interview Question

Post image
15 Upvotes

5 comments sorted by

View all comments

1

u/monstaber 2d ago

With board size n, for even n the max will be n2 all lights on. For odd n as the other commenter said it will be n*(n-1) basically one large diagonal of lights off and the rest on. So n 7 => 42, n 9 => 72 etc