Datadog Interview Question

Coding interview: - Pattern matching (without regex)