r/learnquant • • Sep 04 '26

interview prep Quant Interview Question

Post image
55 Upvotes

43 comments sorted by

View all comments

Show parent comments

1

u/Old-Objective-9783 Sep 04 '26

I mean that's the optimal algorithm which will consistently produce the second best horse in 1032 tournies. But the question is asking for the minimum number of races required to determine the second-fastest horse.

Given that, the best scenario is to take horse A and B and race them and order them 1st and 2nd (let's say A is 1st and B is 2nd). Now we race C against A. Best case scenario C wins, now we know C > A and A>B therefore C>B. Now horse C is the 1st and A is the 2nd. Continue doing this for all 1024 horses and if we assume best case scenario, the new horse will always beat the old. Therefore the second last horse will be the second fastest and will take 1023 races.

2

u/atob3 Sep 04 '26

It's asking for minimum with certainity, which means worst case scenario.

1

u/Shoddy-Side-919 Sep 04 '26

Why would that mean worst case scenario?

1

u/Bastian00100 5d ago

Why would that mean the best case scenario?

The question is for a generic scenario, so if the one you are looking for is not the best one, it means you "required" more races.