Sorting Arrays

VERSION 1 Published

Created on: Jan 19, 2009 5:11 AM by AndySteele - Last Modified:  Jan 19, 2009 6:42 AM by AndySteele

A very common problem to be solved is sorting lists of items in an array. For the majority of programmers this will involve digging out our old algorithm books and implementing one of the standard sort algorithms such as quick sort, merge sort or even a simple bubble sort.

This can be a distraction from the main purpose of writing a business application.

It would be nice to see a standard sort implemented along the lines of the sort algorithm provided as part of the Java Collections API. This should provide a stable, consistent algorithm with known performance characteristics. Using a similar strategy to the Collections API where a user-defined Comparator can be supplied to manage user-defined sort keys e.g. a particular field in a record, would probably solve a large number of use cases.
Average User Rating
(7 ratings)




Jan 19, 2009 7:33 AM Click to view rost's profile rost says:

And don't forget Cobol generation !

Bottom Banner