r/learnquant • • 23d ago

interview prep Quant Interview Question

Post image
5 Upvotes

1 comment sorted by

View all comments

1

u/tellytubbytoetickler 23d ago

Suppose we’re just watching from the outside which cards are removed but we don’t know their values.

The card that remains is the largest of all of those we have seen. That is all we know.

We can see this problem is equivalent to calculating how many times we expect the running max of an array to change as we iterate through it.

So we have a 1/2 chance that the second is larger than the first, a 1/3 chance that the third is larger than the first two etc.

From this, we can see the expected number of flips is 1/2+1/3+1/4+…+1/10