954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

creating a Trie

Hi all,

I would like some ideas as to how I would go about developing a trie to store a very small dictionary (of about 10 words). How would I get the program to get each word and make the relevant nodes and edges? Also dela with compressing it?

Thanks for any help in advance.

nisaa15
Newbie Poster
14 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Do you mean a tree? ;)
I'd say use a map or something along those lines. If there's a java equivalent of the c++ multimap, then go that route.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 
Do you mean a tree? ;) I'd say use a map or something along those lines. If there's a java equivalent of the c++ multimap, then go that route.

There is. Here's a handy little link: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html

Daishi
Junior Poster in Training
80 posts since Aug 2005
Reputation Points: 10
Solved Threads: 2
 

The OP wants the tries data structure.
I don't know of any class that supports it.

jim mcnamara
Junior Poster
180 posts since May 2004
Reputation Points: 62
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You