3 ms·
It's not an optimum ordering algorithm, it's a top-k problem. The overall order is not requisite, nor is the order of the top-k elements. The problem is that it
by dougabug 13y ago
It's not an optimum ordering algorithm, it's a top-k problem. The overall order is not requisite, nor is the order of the top-k elements. The problem is that it provides no useful insight into whether the candidate will be a capable PHP programmer. The most productive, capable PHP developers I've worked with would not likely fair well on this kind of question, while some of the most useless, hapless programmers I've known live for this kind of question. I agree with the sentiment that these kinds of questions are largely asked to make the interviewer feel smart.