Introduction to Pattern Matching Using Tries

Pattern matching

In strings, pattern matching means checking the presence of a given sequence of characters called a pattern in a more extensive series of letters or characters, which we call text.

Some examples of the problems associated with pattern matching include finding exact matches, partial matches, both exact and partial matches—as well as just the first match and the position of each match within the text. 

Brute-force approach

Let's look at an example to understand a simple pattern-matching problem.

Get hands-on with 1400+ tech skills courses.