4 ms·
> if you expect them to use Unix sort you should somehow imply a situation where that is the best approach. I think the implied question is whether the intervi
by whym 6y ago
> if you expect them to use Unix sort you should somehow imply a situation where that is the best approach.
I think the implied question is whether the interviewee is aware of the fact that trying to load a 1 GB text file could use up too much RAM space of the system. Unix sort is arguably the most memory efficient among the 4 choices there. It depends on the amount of available resources (which was not specified), and some companies might be willing to casually let people use 100 GB machines, though.
- blackbear_ 6y agoThat is a fair point. A good script would be to move towards this scenario of more data than RAM and see what the candidate comes up with.