Hacker News new | ask | show | jobs
by ivanche 4217 days ago
" Brainteasers are popular." Can somebody explain why? I'm genuinely interested, since in software dev interviews we see less and less brainteasers...
7 comments

One (slightly cynical) answer is that people like to hire people like them. Most quant types working in hedge funds are very good at brainteasers, and if other people are good at brainteasers it ticks one of the "this person is like me" boxes whilst also ticking the "this person is smart" box.

It also allows an endless pissing contest of comparing new brainteasers among your colleagues, and telling stories of helpless candidates who couldn't even manage the first gasp of a hint of an idea towards the solution.

I tend not to like extremely complex brainteasers as interview questions, and especially not ones that require an "aha" moment to solve them correctly, because mostly what you're testing for is whether the candidate has seen that question before (or one like it).

On the other hand, I am a big fan of asking relatively easy math questions (i.e. first year undergraduate) in interviews, because if I'm going to be paying someone $100k+ to work on mathematical models, I'm damn well going to make sure that they understand basic probability, statistics, calculus and linear algebra. These are a bit like fizz-buzz for quants - if the candidate can answer them it doesn't prove anything, but if they can't answer them then you can stop the interview right there.

It's a shibboleth : https://en.wikipedia.org/wiki/Shibboleth. It shows you belong.
I work as a quant and I like to give brainteasers in interview. It definitely does not tell me if someone will necessarily be good at his job or a good fit for the team, but it does help me rule out a lot of potential candidates.

These are not very tricky brainteasers that depend on getting a particular insight. They're actually somewhat pedestrian. However, if you can't manage to competently work out a simple, well defined problem, you're going to struggle with the more complex issues we deal with.

Can you give an example or two of the more complex issues you deal with?

I honestly have no idea.

Can't be too specific, but I often need to solve differential equations, find closed form solutions to some integrals (mathematica helps but is often not sufficient), build models which strike a good balance between realism and tractability. Find which properties are important to preserve in models and which aren't, etc.

chollida1's comment is spot on and I oscillate between 1 and 2.

None of these have any similarity to brainteasers. In fact, these are all excellent subjects on their own that could be tested directly. For example:

"Give me an overview of a numerical method used to solve differential equations."

The more time you spend asking brainteasers, the less time you have to devote to your actual skills of interest. You may even find that quizzing someone on mathematics may help refresh and solidify your own understanding.

Do you have experience interviewing candidates?

Many candidates will answer this question correctly and yet be totally unable to do anything when they're confronted with a non textbook case. To be clear the brain teasers I ask are mathematical problems, not the type of brain teasers used in consulting interviews. For instance:

We play a game where we each draw a secret random number uniformly between 0 and 1. We each may re-throw if dissatisfied with our first throw, or me may keep it. We do not know whether or not the other has chosen to re-throw. We then compare our results and he who holds largest number wins $1. What is the best strategy to follow?

That's the type of brainteaser I'd ask. It's accessible to a good high school student. I interviewed a PhD candidate in applied mathematics from a top Ivy league university who:

- wouldn't believe that maximizing the expected value of the number obtained wasn't optimal until shown an explicit counterexample

- was unable to write the equations properly or model the problem

- was unable to solve the equations after I handed them out to them

He was however able to talk about his thesis work. Your questions wouldn't have caught that at all. His thesis work was in game theory.

I haven't read up on game theory in a long time, does "best strategy to follow" mean "the strategy that maximizes my expected payoff for all the strategies my opponent could employ"?

So, an explicit counterexample would be my opponent picking a strategy of only re-throwing above .25. His expectation is then .25 * (0 + .25)/2 + .75 * (0 + 1)/2 ~= .40, so I should not rethrow if I get above .40 and below .50, even though it would raise my own expectation.

Am I thinking about that correctly?

Ok, I'm stumped. If I've parsed your description correctly, we get no info about our opponent's actions or the results until the end. Absent any ability to observe their strategy, it seems like you do want to maximize for expected value of your own actions, and I'm curious about the counterexample.

How do we maximize EV? A single throw's pdf is 1, for x in [0,1], so its EV is 0.5. The question is how to improve on a single throw by deciding to re-throw. A re-throw is independent and gives the same EV. We want a strategy that gives us higher cumulative EV. Say our strategy is that we have a threshold A, where we re-throw any result below A. Because x is uniform, the probability that we re-throw is also A. The cumulative EV of the strategy is A * EV(second_throw) + (1-A) * EV(keep_first_throw). Since we only keep the first throw for results in [A,1], the EV for that event (integrating x * pdf from A to 1) is (1+A)/2. So EV of the whole strategy is A/2 + (1-A) * (1+A)/2. It has max EV when A is 0.5, giving EV of 5/8.

So how do you do better?

There's two ways of interpreting that result, though. Maybe it shows that mathematical brain teasers aren't a good way of testing for mathematical ability.
I wouldn't describe this as a brainteaser. It's a well-defined math problem, not some BS question about manhole covers or barbers in Chicago.
hey murbard is the answer to this 1-goldenratio? (.618...)

to get this I computed the function f(x,y) which is my expected value if I reroll if roll <= x and my opponent re-rerolls if roll <= y. let p be the optimal value. by symmetry f(p,p) = 0.5 so there must be a local minimum around that point. solving by taking a one sided derivative gives me (sqrt(5)-1)/2

In my experience in finance it's all about the interviewer showing the interviewee how smart she is.

There's smart quants/programmers/traders/etc and people good at solving brainteasers. You need the former, but people who use brainteasers in the interview process typically only find the small sliver of overlap in the venn diagram.

Brainteasers in an interview is a red flag that you probably don't want to work for the company. In my experience.

If you're interviewing someone and you're lazy enough (or not confident enough) in your skills at assessing a candidate, that's a weakness.

Hedge funds have a hard-on for these kind of questions regardless of the role. I got a few of them in the interviews I had for the one I did IT support for...

They also liked taking Ivy grads with BAs and giving them receptionist jobs.

It's the perfect market at work, I tell you. The private industry can do no wrong because then people would stop investing in the company and/or stop buying their services.

/s

I don't see why the sarcasm. Hedge funds are not banks; they live or die by the brains of the people they hire. If they perform well, they get more investors. If they fail to perform, they go bust, and noone is there to bail them out.
As in most industries, I think you are undervaluing the importance of sales. It's true that long term performance dips will cause a fund to go bust, looking at the number of funds that don't outperform (or only marginally outperform) the market, year after year, makes it obvious that sales are an important part of the hedge fund industry.
Right, but it's not sales in the sense of "lets convince stupid people to waste money by giving it to us", it's more in the sense of "trust us, we're smart, have a good strategy and good past performance". Of course, the average hedge fund under-performs the market (for a particular measure of performance), but rich people might have other investment goals (the chance of finding alpha & beating the market, diversification, negative beta (anti-cyclic returns), ...). Same as with casinos/lottery, they need little sales, people know it in average underperforms just keeping the money, but you're not gambling for the average, you're gambling for the variance.
Interesting point, but given that the average performance is ... average, most rich people would be better off investing in an inside edge on a deal. Which is what I suppose they do.
They're definitely important but hedge funds depend on investor confidence. Ours made an untimely bad decision that not only resulted in significant losses but caused investors to flee.

Sales is tied to performance. Hedge funds' customers are even more conservative than they are.

The sarcasm's there because the market clearly doesn't work as it should here, just as it doesn't work in many other industries. The free market works for commodities trading, but not much else.
That's basically it though. The company can do no wrong so it tries to hire people who are extreme serial achievers. They're very sensitive to what people in the company say externally.
Brainteasers are somewhat common in consulting interviews (at the undergraduate level). The idea behind giving brainteasers is more to see how you would structure and break down a problem, and whether you can communicate your structure and solution effectively.
Interviewers are (should) not interested in the correct answer. They are interested in seeing the candidate think out loud. They want to see how you start tackling difficult problems.
I second this, we almost never use brainteasers but they can be useful for seeing how people think about solving problems. Once people have 2+ years of experience it becomes less relevant because it's more useful to talk about actual work they've done rather than some puzzles.