01 // PROJECT AT A GLANCE
MATCH & NMATCH
CRe-coding wildcard pattern matching, the *.txt kind — then counting every way it matches.
When you type *.txt in a terminal, something decides which files match. This project consists in writing that something: an engine that says whether a text matches a pattern containing wildcards. Then the question is pushed one notch further: when there are several wildcards, how many different splits produce the same match? It is the move from « does it match » to « in how many ways », and it completely changes the nature of the problem.
Two functions to deliver separately: match, which answers yes or no to « do these two strings match », and nmatch, which counts how many different splits of the '*' wildcards produce that match.
PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- The shell's wildcard engine rebuilt by hand
- Counting the possible splits when several '*' share the same string
04 // SOURCE TREE
READING SOURCE…