Solving Add and Search Word Data structure design in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Design a data structure that supports the following two operations:

void addWord(word)
bool search(word)

Example:

addWord("bad")
addWord("dad")
addWord("mad")
search("pad") -> false
search("bad") -> true
search(".ad") -> true
search("b..") -> true

See the full details of the problem Add and Search Word Data structure design at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go