Subj : File Exporer like Sorting To : comp.programming,alt.comp.programming From : Newb Date : Sat Sep 24 2005 08:05 pm 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. .