top | item 3725687

(no title)

narkee | 14 years ago

Is that supposed to be a trick question?

I can't tell if the answer is n(n-1)/2 or just n(n-1), because I'm unsure whether you would be looking to count a "bidirectional TCP connection" as 1 or 2 TCP connections...

discuss

order

Maro|14 years ago

When I give this question I always make sure it's clear that I mean the "/2" case by saying something like "so there's only connection between each pair of computers" or "so you only count one connection between each pair computers".

Anyways, the point is to weed out people who say nonsense like 10^9 and 9^10 and 10! and whatever else pops into their head. In cases when people give these incorrect answers, it's always clear that they're just guessing, and when I tell them it's wrong they stress out and that's that. They refuse to even answer the n=3 case, because they've already given up.

The reason we found this a good filter is because people who are unwilling to think a little to give the right answer, are usually unimpressive in other parts of the interview, too. Ie. they give stock answers, and if we ask more or would like to drill down, they give up. That's our limited experience.

newman314|14 years ago

Yeah, I wasn't sure the way the question was posed either if it was n(n-1)/2 or n(n-1).

The bidirectional piece needs to be clarified in the way the question is posed.