an TLE solution for regular expression matching.
an accepted but ugly solution for regular expression matching.
add solution for two sum problem.
a much more elegant solution for regular expression matching.Taken from http://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html