I am always a big fan of puzzles. And the fact that I’m graduating and hunting for jobs gives me the best reason/motivation for cracking them. 

I was checking the Facebook Puzzles today. Facebook engineers have done a great job motivating their puzzles. Well, for someone with a computer science background, some of their puzzles are clearly classical CS problems. 

It’s A Small World” problem has another name in CS: the k-nearest neighbor problem. Instead of checking with every datapoint, the solution to the problem could be accelerated by limiting the search to certain regions only, which can be achieved with KD-tree. ANN(approximate nearest neighbor) is a good example of such approaches. 

User Bin Crash” problem is a classical dynamic programing problem. Once you follow the DP approach to nail down the metric, the break-down and the initial value, it’s a shoe-in DP problem. 🙂

Now that I have done the “snacks”, I’ll start thinking about the harder ones…

btw: I’m not providing any solutions to the puzzles, just my 2 cents on how to crack them. 🙂

 

2 Responses to “a first cut on some facebook puzzles (snacks)”
  1. Could you give me some hint or link of reference on how to do the Its a Small World problem

  2. some problems are NP complete also. For example, “Peak Traffic” is basically the max-clique problem. Not only that, you have to find successive clique s.

Leave a Reply