Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trie data structures - Java [closed]

Is there any library or documentation/link which gives more information of implementing Trie data structure in java?

Any help would be great!

Thanks.

like image 589
JJunior Avatar asked Sep 27 '10 18:09

JJunior


People also ask

Is there a trie data structure in Java?

There is no trie data structure in the core Java libraries.

How does trie work in Java?

In a trie, every node (except the root node) stores one character or a digit. By traversing the trie down from the root node to a particular node n, a common prefix of characters or digits can be formed which is shared by other branches of the trie as well.

How do you store a trie?

Trie DB is the persistent storage. Two options are available to store the data: Document store: Since a new trie is built weekly, we can periodically take a snapshot of it, serialize it, and store the serialized data in the database. Document stores like MongoDB [4] are good fits for serialized data.


1 Answers

You could read up on Java Trie or look at trie.

like image 167
Arc Avatar answered Sep 26 '22 02:09

Arc