directory
Version:
v0.0.0-...-9b92ec5
Opens a new window with list of versions in this module.
Published: Jan 3, 2021
License: MIT
Opens a new window with license information.
README
¶
实现一个 Trie (前缀树),包含 insert
, search
, 和 startsWith
这三个操作。
示例:
`Trie trie = new Trie();
trie.insert("apple");
trie.search("apple"); // 返回 true
trie.search("app"); // 返回 false
trie.startsWith("app"); // 返回 true
trie.insert("app");
trie.search("app"); // 返回 true`
说明:
- 你可以假设所有的输入都是由小写字母
a-z
构成的。
- 保证所有输入均为非空字符串。
Directories
¶
Click to show internal directories.
Click to hide internal directories.