Being able to build the right data structure or collection class for a particular application is only half the battle. Unless the data sets in your problem domain are very small, any collection of your data will benefit from a little organization. Organizing the elements in your list or collection by a particular value or set of values is known as sorting.
Sorting your data is not strictly necessary, but doing so makes searching or lookup operations much more efficient. Likewise, when you need to merge multiple collections of data together, having the various collections sorted in advance of the merge can greatly improve the efficiency of the merge operation.
If your data is a collection of numeric values, then sorting can be something as simple as arranging it in ascending or descending order. However, if your data consists of complex objects, you can sort the collection by a particular value. In this case, the field or property by which the...