Leetcode 0211. Design Add and Search Words Data Structure
Posted on Tue 05 November 2024 in Leetcode • Tagged with trie-prefix-tree, dfs, recursion
Question Link : https://leetcode.com/problems/design-add-and-search-words-data-structure/
Difficulty: Medium
Premium: False
Question
Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement the WordDictionary class:
WordDictionary() Initializes the object. void addWord(word) Adds word to the data structure, it can …
Continue reading