Choosing a DataStructure

From: Santosh (santosh_jain99_at_yahoo.com)
Date: 11/19/03

  • Next message: Christian Gollwitzer: "Re: hash table idea good or no good?"
    Date: 18 Nov 2003 16:09:49 -0800
    
    

    Hello,

    I would like some input on choosing a datastructure and a algorithm. I
    have a text file which contains three strings(say name, phonenumber
    and city). The file contains a about a billion records.

    I need to choose a datastructure which will sort efficienctly based on
    any of the strings(keys) which is may be any of the three or a
    combination of three in which case we will need to sort with multiple
    keys.

    What is the best datastructure to store this data?

    the problem here is that the key is not fixed. It could be the name,
    phonenumber or the city and sometimes we nmight also need to sort
    first by name and then by city.

    I was thinking we could use multi-key quicksort but I am a little
    confused as to how to store the data.

    Any suggestions?

    Thanks in advance


  • Next message: Christian Gollwitzer: "Re: hash table idea good or no good?"