1

We are building a Phone book (Contacts) application and i have just googled on the net and found a useful data structure to use for the phone book application which is TRIE.

Could you please guide/suggest links such that we can implement a Phone book application using Trie data Structure.

Im a new bie to Data Structure and Algorithms in Java,Please consider this as my request to help me out.

Im unable to proceed as to whether it is really possible to implement it using TRIE data Structure or not?

2
  • It seems like you're trying to make the solution (the Trie datastructure) fit some nebulous problem. Define the precise problem and then see what solutions make sense. Commented Dec 11, 2010 at 16:32
  • -1: It seems the guy is looking just for the code. Check out his discussion with Goran Jovic in one of the answers below. Commented Feb 22, 2011 at 16:58

2 Answers 2

1

You should have your address book in any format needed, and use Trie to index it for search only.

See Trie data structures - Java

and Trie implementation

for some Java implementations.

EDIT:

and this: http://www.codeproject.com/KB/recipes/PhoneDirectory.aspx

Sign up to request clarification or add additional context in comments.

7 Comments

@Goran,Thank you for ur concern,any links you can suggest which can be helpful to implement this since i have to do it from sratch development in java
@Deepak: I suppose you already have your address book implemented. So, all you need is a trie, where each node references your addres book entries somehow (by id, pointing to an object.. that depends on your implementation)
@Goran,Thanks for your concern,In case you find the real implementation for contact based application.,Please share the link
@Deepak: NP, if I run into it, I'll remember to do so. Meanwhile, try googling for it. You already have the keywords.
@Goran,I know its bad to ask for answers on this forum,but its difficult to implement a phone based (contacts) application with searchByName and SearchByNumber facility using Trie data Structure,Anyone who has already implemented it.Please share your Advice/Suggestions/Link/Code
|
1

Checkout a previous question here on stackoverflow: Where do I find a standard Trie based map implementation in Java?

There are a few links in there that might help you out. Other useful links might be the following: http://wikipedia-clustering.speedblue.org/trieJava.php or http://www.technicalypto.com/2010/04/trie-in-java.html

1 Comment

Btw, also check out the 'related' questions at the right of this page. They might very well help you out too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.