Skip to Main Content
Java 6 Illuminated: An Active Learning Approach, 2nd Edition
book

Java 6 Illuminated: An Active Learning Approach, 2nd Edition

by Julie Anderson, Herve J. Franceschi
February 2008
Intermediate to advanced content levelIntermediate to advanced
1288 pages
39h 39m
English
Jones & Bartlett Learning
Content preview from Java 6 Illuminated: An Active Learning Approach, 2nd Edition
516 CHAPTER 8 Single-Dimensional Arrays
Figure 8.23a
The next card to insert
is a 4
Figure 8.23b
9 is shifted to the right
8.6.3 Insertion Sort
Like Selection Sort, Insertion Sort also derives its name from the algorithm
used to sort the array. The basic approach to an Insertion Sort is to sort ele-
ments much like a card player arranges the cards in sorted order in his or
her hand. The player inserts cards one at a time in such a way that the cards
on the left side of his or her hand are sorted at all times; the cards on the
right side of his or her hand have not yet been inserted into the sorted part
of the hand. As Figure 8.23a shows, the three yello ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour
Java Illuminated, 4th Edition

Java Illuminated, 4th Edition

Julie Anderson, Hervé J. Franceschi

Publisher Resources

ISBN: 9780763749637