What is the most efficient wildcard string matching algorithm? I am asking only about an idea, it is not necessary to provide actual code.
I\'m thinking that such al
The performance will not just depend on the length of the string to search but also on the number (and type) of wildcards in the query string. If you are allowed to use a *
which matches any number of characters, up to and including the entire document, and you can have any number of stars, this will put some limits on what is possible to get.
If you can determine a match some string foo
in O(f(n)) time, then the query foo_0*foo_1*foo_2*...*foo_m
will take O(m*f(n)) time where m is the number of *
wildcards.