Live data from Hacker News

Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

news.ycombinator.com

141–150 of 363 posts

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#141
post #12

Applied math/scientific computing: If hiring someone, I would describe some practical scenarios problems involving the solution of finite-dimensional linear systems, and ask to see how they would suggest solving them in each circumstance (LU, QR, SVD, iterative methods, etc). More discussion oriented than in doing rote recital of algorithm structure, probably. I would do something similar for functional characterizat…

Interesting - this is exactly the kind of answer I'm looking to learn from. Are these really so utterly fundamental that someone could do them under pressure without thinking? Is it the case that someone who can't answer these near automatically is, in effect, incompetent (in this field)? I'm wondering if you've set the bar higher than FizzBuzz is in computing, or if this really is equivalent. Thanks!

For this list, I'm basically assuming that I'm interviewing a candidate for a Ph.D. level (or equivalent) numerical analyst R&D type position. If they don't feel comfortable discussing the basics of these items, then they probably can't do too much more for us than algorithm plug&chug. Which has its value, but not what I had in mind.

That said, I also wouldn't expect someone to write out implementations on a whiteboard under pressure (I'm not a Google recruiter). I'd be more interested in prodding their brain to gauge their general level of understanding, which is (I'm pretty sure) how hiring committees for mathematicians in academia operate. If they have a good foundation, I think it's less important that they've rote memorized implementation details.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#142
post #18

I'm an SE now, but I got my degree in Northwest Semitic Literature and Linguistics: Here's a couple: Are Semitic languages VSO or SVO? What does it mean that Semitic words are triliteral?

Semitic words are triliteral:

http://en.wikipedia.org/wiki/Semitic_root

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#143

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

I've used a similar question, but with two coins. I think if I am ever in a position where I am hiring again, I may follow-up that question with this extension to 100 coins.

What is the most common answer? Typically, I get either blank stares or a gut answer of just a little over 50%. I find that physics people are pretty good at solving the problem.

I would also REALLY hope that somebody who is applying for a job in finance understands the bond prices and interest rates, but I suppose that does make it a good fizz buzz type question.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#144
post #121

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

Do you mind posting a simple walkthrough for the answer

Sure. The slick answer is

The chance of picking the biased coin is 1/1000. The chance of seeing 10 heads from a fair coin is (1/2)^10 = 1/1024. These are nearly equal, so given that you've seen 10 heads, there is a 50/50 chance of having a biased coin. So the probability the next flip shows a head is

  P(H) = P(biased) * P(H|biased) + P(fair) * P(H|fair)
       = 0.75
The long answer -

Yo want to figure out P(biased | 10H). Using Bayes rule this is

  P(biased | 10H) = P(10H | biased) * P(biased) / P(10H)
                  = P(10H | biased) * P(biased) / (P(10H|biased) * P(biased) + P(10H|fair) * P(fair))
                  = 1 * (1/1000) / (1 * 1/1000 + 1/1024 * 999/1000)
                  ~ 0.5
and you now compute the probability of the next toss being a head as above.

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#145

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

[deleted]

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#146
post #121

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

Do you mind posting a simple walkthrough for the answer

Here's my walkthrough: http://pastebin.com/e2ea9XUD

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#147
post #145

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

[deleted]

But it's very likely that you picked a fair coin to start with, because most of the coins are fair. How do you compensate for that?

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#148
post #93
post #74

Where I work, we have a 4 question SQL test where we sit you in front of a dummy database, give you 4 printed results, and say "make the queries to produce exactly these results." Very very few people get all of them, but it gives us an idea of where somebody is at in their ability and knowledge. The first is the easiest, and the second one isn't bad. The 3rd and 4th trip up most people though.

I'd be curious to see that test.

Ditto!

I'd love something like [0]You can't javascript under pressure, but You can't Query under pressure for SQL. :-)

[0]http://games.usvsth3m.com/javascript-under-pressure/

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#149

I was a mathematician, and now work in finance (systematic trading). I've found a reasonable negative filter is A jar has 1000 coins, of which 999 are fair and 1 is double headed. Pick a coin at random, and toss it 10 times. Given that you see 10 heads, what is the probability that the next toss of that coin is also a head? That tests their ability to turn a problem into mathematics, and some very basic conditional p…

My wife and I have discussed this, and get a different answer to a few of the solutions we then googled for. I think it is as simple as: http://pastebin.com/gg5DTySG

[deleted]

Re: Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?

#150
post #54

I was an electrical engineer before I was a computer programmer and people liked asking questions about Ohm's law and calculating total resistance of resistors in series and parallel. EDIT: I should clarify... They weren't asking about the theory behind Ohm's law but rather to apply it to various circuits.

can you give an example? tia!

  A-->   +--[1 Ω]--+--[1 Ω]--+
         |         |         |
       [1 Ω]     [1 Ω]     [1 Ω]
         |         |         |
         +--[1 Ω]--+--[1 Ω]--+
         |         |         |
       [1 Ω]     [1 Ω]     [1 Ω]
         |         |         |
         +--[1 Ω]--+--[1 Ω]--+    
Find the resistance between A and B.
Post reply on HN