I was asked this question in Round 3.
There are n number of documents and you have to count total words. You can designate each document to seperate machines. Impelemnting the straightforwards solution is trivial. Interviewer asked implement the api to get approximate result and not accurate one. Not sure I understooed completely what he was asking. He was considering the scnerio what if machine is erroenous. This went into probability concepts. I knew resullt can have range (INT_MIN to INT_MAX.) and only 0 to INT_MAX will be valid. After thar prbability comes into picture. I ended up having negative feedback for this round. Any idea guys what exactly interviewer was looking for?
int getApproximateResult();