Re:My toughest job-interview question ever
by yason on Tuesday May 12, 2009 @07:24AM
(#605201)
While the interviewer probably wanted a typical "programming answer", I wonder how large a dataset you could do by simply using the command line. That's programming, too.
Just use sort and uniq.
Or if it's slow, sort in parallel, then merge into one stream, and extract the frequencies.
Re:My toughest job-interview question ever
by bayleo on Tuesday May 12, 2009 @09:55AM
(#605357)
Given the wording of the question this is the route I would have taken; give him the engineering solution, not the comp sci solution. I guess this question has a certain merit for weeding out theorists from pragmatists.
Just use sort and uniq.
Or if it's slow, sort in parallel, then merge into one stream, and extract the frequencies.