Hacker News new | ask | show | jobs
by fzort 5725 days ago
http://www.fzort.org/mpr/junk/greplin-3.pl.txt

Perl, 7s. Looks like I arrived at the same recurrence that madars used, but I swear I didn't look at his solution...

Memoize magically turns it from exponential to polynomial.