
EXERCISES,PROBLEMS, AND PROJECTS
8.10 Exercises,Problems,and Projects 545
the largest element in each subarray into the last position of the
subarray.
■
An Insertion Sort arranges elements of an array much like a card
player arranges cards in sorted order in his or her hand. The ele-
ments are inserted one at a time in ascending order into the left
side of the array.
■
To sort an array of objects, you can use the class method provided
to compare objects’ values.
■
A sorted array can be searched more efficiently using a Binary
Search, which successively reduces the number of elements to
search by half.
■
Arrays of integers can be used as an ordered group of