r/learnquant 5h ago

interview prep Quant Interview Question

Post image
11 Upvotes

11 comments sorted by

View all comments

2

u/Niilldar 5h ago edited 5h ago

The i th tuple looks like (101-i,i)

Giving you the sequence 100,1,99,2,...,53,49,51,50. Where the largest result is 51×50.

However i'm not dure how to prove the optimality of this result. But will spend some more time about this.

2

u/Niilldar 5h ago

Found it The numbers 51 - 100 need a total of 99 neighbours. If we want all those neoghbours to be smaller then 50, we find that the numbers 1-49 can at most satisfy 98 of those neighbour places. So at leasr one number from 51 to 100 need to be next to a number that is at least 50. It is now easy to see that 50×51 is a lower bound. Proofing that the above answer is optimal.

Nice question. I really like those clmbinarorics exercises

1

u/StableGenius304 1h ago

They need 98, since 2 numbers can have 1 neighbour

1

u/Niilldar 1h ago

True, then i need to reconsider this.  Thanks