Data Structures and Algorithms
with Object-Oriented Design Patterns in C# |
Program declares the TwoWayMergeSorter class. The TwoWayMergeSorter class extends the AbstractSorter class defined in Program . A single field, tempArray, is declared. This field is an array of ComparableObjects. Since merge operations cannot be done in place, a second, temporary array is needed. The tempArray field keeps track of that array.
Program: TwoWayMergeSorter fields.