|
|
|
|
|
by clipradiowallet
1743 days ago
|
|
A tale of 2 technical interviews.. Interviewer: There is a file of 500,000 words. Some of the words are duplicated. I would like you to produce a report of the duplicated words, and the report should be sorted most-duplicated to least-duplicated. You can use any programming language you like. Candidate 1 spent half an hour writing a program in Java that accomplished the task. He passed, but was ultimately not offered a job. Candidate 2 spent approximately 10 seconds and typed `cat words.txt | sort | uniq -c | sort -gr`. He passed, and was hired. The moral is...sometimes a technical task in an interview is not to assess only your coding ability, it's also to assess your problem solving methodology. The person who used common user-space unix/linux tools didn't already have his mind locked into "writing a program to accomplish the interviewer's objectives" - he just used the lowest common denominator(the shell) that could accomplish the task he was given. It's not all algorithm memorization that counts. |
|
Your process seems flawed as it appears to operate solely on your bias, from this description.