Subj : Re: File Exporer like Sorting To : comp.programming,alt.comp.programming From : Kerl Mitte 30 Date : Tue Oct 11 2005 11:41 am Hi In Java use an appropriate container-class, e.g. array, and use its sort function. Define a compare function for the different keys. Chris "Newb" wrote in message news:3pl31aFavnn3U1@individual.net... > What is the best type of algorithm/strategy > to tackle a problem like this? > > I have data which is similiar to a files inside a > directory > > 1) Name 2) Size 3) Time 4) Someother Property > > Some of these are strings & some ints. > > The list of data is maintained in the order in which > I recieve it. I want to always remember this order > (i.e. get back this order if needed) > > But at different times, I want this data sorted by > name or size or any of the other properties. > > What's the best way to accomplish this? > What strategy is best suited for different sample > sizes - i.e. if I expect to have 10 such elements > on the average or 100 such elements or 1000? > > I am going to be programming this in Java. > I am not interested in actual code - I am > just interested in what are the various > ways to achieve this. > > .