Assume that insertion sort is being run on the below array. The algorithm is about half way through its sorting of the array. What will the array look like after the next pass of the algorithm? Note: the bold part of the array indicates the part that has already been sorted by the algorithm. int A[] = { 80, 100, 110, 120, 90, 60, 120, 70}; O int A[] = { 60, 70, 80, 90, 100, 110, 120, 120 }; O int A[] = { 80, 90, 100, 110, 120, 60, 120, 70}; O int A] = { 90, 60, 120, 70, 80, 100, 110, 120}; O int A[] = { 70, 80, 100, 110, 120, 90, 60, 120}; int A[] = { 60, 80, 100, 110, 120, 90, 120, 70};

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

(Java)

choose the correct multiple choice

 

Assume that insertion sort is being run on the below array. The algorithm is about half
way through its sorting of the array. What will the array look like after the next pass of
the algorithm? Note: the bold part of the array indicates the part that has already
been sorted by the algorithm.
int A] = { 80, 100, 110, 120, 90, 60, 120, 70};
O int A[] = { 60, 70, 80, 90, 100, 110, 120, 120 };
O int A[] = { 80, 90, 100, 110, 120, 60, 120, 70};
O int A[] = { 90, 60, 120, 70, 80, 100, 110, 120};
O int A[] = { 70, 80, 100, 110, 120, 90, 60, 120};
int A[] = { 60, 80, 100, 110, 120, 90, 120, 70};
Transcribed Image Text:Assume that insertion sort is being run on the below array. The algorithm is about half way through its sorting of the array. What will the array look like after the next pass of the algorithm? Note: the bold part of the array indicates the part that has already been sorted by the algorithm. int A] = { 80, 100, 110, 120, 90, 60, 120, 70}; O int A[] = { 60, 70, 80, 90, 100, 110, 120, 120 }; O int A[] = { 80, 90, 100, 110, 120, 60, 120, 70}; O int A[] = { 90, 60, 120, 70, 80, 100, 110, 120}; O int A[] = { 70, 80, 100, 110, 120, 90, 60, 120}; int A[] = { 60, 80, 100, 110, 120, 90, 120, 70};
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Counting Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage