Linkage
Reminder
1.This is a naive implementation of Trie, which do not support the delete function, furthermore, the long string which can match multiple words is also not supported.
2.The key and value of a map must be Object, the basic type like int and char is not supported.
Code
1 | import java.util.HashMap; |