Choosing a DataStructure
From: Santosh (santosh_jain99_at_yahoo.com)
Date: 18 Nov 2003 16:09:49 -0800
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
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.
Thanks in advance