GoLang Solution For LeetCode Problem: Implement Trie Prefix Tree
Solving Implement Trie Prefix Tree in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Problem Description
Example:
Trie trie = new Trie();
trie.insert("apple");
trie.search("apple"); // returns true
trie.search("app"); // returns false
trie.startsWith("app"); // returns true
trie.insert("app");
trie.search("app"); // returns true
Note:
- All inputs are guaranteed to be non-empty strings.
See the full details of the problem Implement Trie Prefix Tree at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.