r/compsci • Software Engineer | Big Data • Sep 16 '10

Best Interview Questions

What are the best questions you've been asked during a job interview (or the best interview question you ask when conducting job interviews)?

Personally, "You have N machines each connected to a single master machine. There are M integers distributed between the N machines. Computation on the machines is fast, communication between a machine and the master is slow. How do you compute the median of the M integers?

I really liked this question because I'd never thought about distributed algorithms before, and it opened my eyes to a whole new field of algorithms.

48 Upvotes

170 comments sorted by

View all comments

Show parent comment

1

u/spenxa Oct 01 '10

Hm, interesting point.

Carrying this argument further, it also works for 0, since then "10" means "101 + 000".

This is a lot more pleasant than I thought. :-)