Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could get to something working and relatively bug free in 15 minutes with a shell script consisting of little more than cut, head, sort -u, and grep.

For reference: http://www.leancrew.com/all-this/2011/12/more-shell-less-egg...



Sorting, merging, then just a clever unique was basically the only thing I'd consider.

If I used this question I'd add to it.

"Pretend you have to do the work on an Arduino uno, which has very little resources. Your uno can request input and produce output from the disk where these are stored at whatever offset you wish. The log files are 100GB each and sit on a desktop computer with a modern Linux on it. Each log line is 512B. You can create files if you need to through some unspecified protocol with the desktop computer. But the desktop computer must be dumb. It will only write to and read from disk. You can send it any disk system call you wish. Step 2; Now do it without sorting or something absurdly slow"

The point is to ask for actual creative solutions instead of the pattern recognition problems that most of these problem formats are.

You want something that a weekend of drilling won't change the result of


Also possibly comm for combining two lists (one for criteria (a), another for criteria (b), then intersect them with comm).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: