Closed lewang closed 8 years ago
I've heard of this before. Could this be because .*l.*l.*l.*l.*l.*l.*l.*
matches lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
8^60
different ways?
A dynamic programming table will solve this in o(m*n) step.
This is because amongs the 8^60 or so permutation, there are a lot of subproblem that can be calculated once then re-used.
Matching "lllllll" against "~/foo/bar/blah.elllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll" takes a long time.