We have so far solved a few algorithmic/coding problems asked in programming interviews across some of the best companies in the world. Today we are introducing a new series solving Data Science interview questions at these same companies. Many of these places do not have a specialized role for Data Scientists (although that’s changing rapidly). For the rest, a Data Scientist typically solves a logical/mathematical puzzle on a whiteboard. Few of these interviews also ask deep/technical questions on SQL. The rest of the interviews are almost identical to the algorithmic/coding interviews that we have seen so far in this blog. Today, we will solve three simple problems asked at Facebook for a Data Science role. Read along…
Three ants are sitting at the corners of an equilateral triangle. Each ant randomly picks a direction and starts moving along the edge of the triangle. What is the probability that none of the ants collide? Now, what if it is k ants on all k corners of an equilateral polygon?
Let’s start simple, shall we? Here are two ways of solving this problem, both should be obvious after a little thought:
#facebook #software-development #data-science #probability #interview-que