Back to Question

Add and Search Word - Data structure design

Question Explain

Design a data structure that supports adding new words and finding if a string matches any previously added string. The search query can contain the dot '.' character to represent any one letter.

Start Trying This Question Simulation

Click "Start Speaking" and answer the question naturally.