what is a prefix tree in java
The trie, or prefix tree, is a data structure for storing strings or other sequences in a way that allows for a fast look-up.In its simplest form it can be used as a list of keywords or a dictionary. By associating each string with an object it can be used as an alternative to a hashmap.The name 'trie' comes from the word 'retrieval'. The basic idea behind a trie is that each successive letter is stored as a separate node.n its simplest form it can be used as a list of keywords or a dictionary. By associating each string with an object it can be used as an alternative to a hashmap. The name 'trie' comes from the word 'retrieval'. The basic idea behind a trie is that each successive letter is stored as a separate node.