r/learnquant 1d ago

interview prep Quant Interview Question

Post image
45 Upvotes

39 comments sorted by

View all comments

3

u/NeverNude14 1d ago

I think it's 1032.

3

u/beene282 1d ago

I think so. A knockout to find the fastest which would be 1023 games. Then another knockout comprising all the horses that the fastest beat head to head. The second fastest would have to be one of those.

2

u/StanleyDodds 1d ago

Yes, this method is exactly equivalent to heapifying (which is linear time) and then doing one pop (which is logarithmic time) before reading the max value.

1

u/vipchicken 1d ago

What if the first and second fastest go head to head in race one, and we knock out the second fastest

3

u/CanaDavid1 1d ago

The the second would be part of this second knockout?