3 ms·
Knuth vs McIlroy's solutions for a Word Frequency programming challenge: http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ http://www.leancrew.com/
by wwweston 8y ago
Knuth vs McIlroy's solutions for a Word Frequency programming challenge:
http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ http://www.leancrew.com/all-this/2011/12/more-shell-less-egg...
Knuth's solution has its own elegance and interest including various efficiencies and from-scratch facilities.
McIlroy's will make you wonder how much you're wasting in time and complexity.
- deleted 8y ago[deleted]
- YZF 8y agoAnywhere I can see Knuth's solution online? Can't seem to find the link in there.
- wwweston 8y agoHere's the paper: https://www.cs.tufts.edu/~nr/cs257/archive/don-knuth/pearls-2.pdf https://www.cs.tufts.edu/~nr/cs257/archive/don-knuth/pearls-... (ACM ref, too: https://dl.acm.org/citation.cfm?id=315654 https://dl.acm.org/citation.cfm?id=315654 ) Also, I found a blog post which links to a C version of the exercise in the spirit of Knuth's approach, and a Haskell version in the spirit of McIlroy's: https://franklinchen.com/blog/2011/12/08/revisiting-knuth-and-mcilroys-word-count-programs/ https://franklinchen.com/blog/2011/12/08/revisiting-knuth-an...