4 ms·
I also got annoyed with "closest pair of points" problem [1]. It needs some geometry observations to prove how time complexity can be achieved. I was just think
by franzwong 8y ago
I also got annoyed with "closest pair of points" problem [1]. It needs some geometry observations to prove how time complexity can be achieved. I was just thinking "Are they testing me geometry?"
I don't know how questions are created and filtered for interviews.
[1] https://en.wikipedia.org/wiki/Closest_pair_of_points_problem https://en.wikipedia.org/wiki/Closest_pair_of_points_problem
- kjeetgill 8y agoI agree I think it's not a great problem but it's worth knowing: some problems we're designed to have an obvious answer and allow the proctor to guide you to the ideal one. This has the nice property of acting like a fizzbuzz and a sample of how do I work on hard problems stage. The first part is pretty pass fail the second is observational. This unfortunately requires a better thoughtful proctor which isn't always the case. If I had a candidate that couldn't do the (n^2)/2 solution that's pretty bad. It's nested fors, man. Bang out in like 10 lines. Still though, I agree, not great.