Problem 1023 · Medium

Camelcase Matching

For each query, decide whether it can be turned into the pattern by inserting lowercase letters only. A pointer walks the pattern and the query together, advancing on each match.

Open the interactive visualisation