r/learnquant • • 2d ago

interview prep Quant Interview Question

Post image
14 Upvotes

4 comments sorted by

2

u/I-am_Sleepy 2d ago

So we know
- Center is shared, so it must be the least (1)
- The corner must not share, so it must be the larger numbers (9, 8, 7, 6)
- The edge is just filling (5, 4, 3, 2)

Trying some combination, and land on

9 | 3 | 8
2 | 1 | 4
7 | 5 | 6

I'm guessing optimal score would be 16

1

u/Spirited-Talk-4714 1d ago

Well it wouldnt be totally random, you wouldnt want 5 and 4 between 9/8 and 9/7. So you would put 5 between the lowest sum corners, 4 between 2nd lowest, and so on.

0

u/TechnicalSandwich544 1d ago

Alice wants to minimize the score sum of 4 possible square, so: 1 must be on the center; 2, 3, 4, 5 on the edges; 6, 7, 8, 9 on the corner.

The sum thus: 4*1 + 2*(2 + 3 + 4 + 5) + (6 + 7 + 8 + 9) = 62. By PHP, there is at least a square that scores at least 16. You can easily construct such grid.

1

u/Remarkable_Fee4136 1d ago

An example is (9,2,8),(4,1,5),(7,3,6)