We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8468524 commit 51c21e0Copy full SHA for 51c21e0
src/main/java/com/fishercoder/solutions/_208.java
@@ -4,9 +4,21 @@
4
* 208. Implement Trie (Prefix Tree)
5
*
6
* Implement a trie with insert, search, and startsWith methods.
7
-
8
- Note:
9
- You may assume that all inputs are consist of lowercase letters a-z.
+ *
+ * Example:
10
+ * Trie trie = new Trie();
11
12
+ * trie.insert("apple");
13
+ * trie.search("apple"); // returns true
14
+ * trie.search("app"); // returns false
15
+ * trie.startsWith("app"); // returns true
16
+ * trie.insert("app");
17
+ * trie.search("app"); // returns true
18
+ * Note:
19
20
+ * You may assume that all inputs are consist of lowercase letters a-z.
21
+ * All inputs are guaranteed to be non-empty strings.
22
*/
23
24
public class _208 {
0 commit comments