I would recommend using a trie, and a list of all numbers for the same name at a terminating point of the trie.
Regards, Aakash On 2/14/07, Karthik Singaram L <[EMAIL PROTECTED]> wrote: > > It does depend on the size of the problem you have in mind. Tries can be > expensive for names depending on the sparseness of the data set, you may > waste a lot of pointers. If you use B-Trees they may be good in such cases. > B-trees are generally a bit better when it comes to data stored in a disk > with the index alone being cached in memory. > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---