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?"

    Relevant Pages

    • Re: Datastructure design
      ... > I would like some input on choosing a datastructure and a algorithm. ... > have a text file which contains three strings(say name, phonenumber ... > I need to choose a datastructure which will sort efficienctly based on ... > confused as to how to store the data. ...
      (comp.lang.c)
    • Re: Choosing a DataStructure
      ... > have a text file which contains three strings(say name, phonenumber ... > and city). ... > combination of three in which case we will need to sort with multiple ... You just use several custom sorts, ...
      (comp.programming)
    • Datastructure design
      ... I would like some input on choosing a datastructure and a algorithm. ... have a text file which contains three strings(say name, phonenumber ... What is the best datastructure to store this data? ... phonenumber or the city and sometimes we nmight also need to sort ...
      (comp.lang.c)
    • Re: Datastructure design
      ... But what I wanted to know what how can I sort this tree based on ... >> I would like some input on choosing a datastructure and a algorithm. ... >> and city). ... > any data set which is bigger than your computer's real memory size is going ...
      (comp.lang.c)
    • Re: Choosing a DataStructure
      ... > I would like some input on choosing a datastructure and a algorithm. ... > have a text file which contains three strings(say name, phonenumber ... The first problem is where to store the raw data, ...
      (comp.programming)