x
Info
x
Warning
x
Danger
 / 
 / 
 / 
6)Demonstrate how the following array sorted using Insertion Sort.  Show

Question : 6)Demonstrate how the following array sorted using Insertion Sort.  Show : 2015393

6)Demonstrate how the following array is sorted using Insertion Sort.  Show the array after each pass of the outer loop.  [16, 3, 12, 13, 8, 1, 18, 9]

7)Demonstrate how the following array is sorted using Selection Sort.  Show the array after each pass of the outer loop.  [16, 3, 12, 13, 8, 1, 18, 9]

8)Write a set of code to create a two-dimensional 10x10 array and initialize every element to be the value of i * j where i and j are the two indices (for instance, element [5][3] is 5 * 3 = 15).

9)Explain how to alter the Selection Sort algorithm so that it sorts in descending order instead of ascending order.

10)Write an insertion sort method to sort an array of String values (instead of an array of int values).  Assume the array is an instance variable of the current class called list, and number is an int instance variable that stores the number of elements currently stored in list.

Solution
5 (1 Ratings )

Solved
Computer Science 4 Years Ago 123 Views
This Question has Been Answered!
Unlimited Access Free
Explore More than 2 Million+
  • Textbook Solutions
  • Flashcards
  • Homework Answers
  • Documents
Signup for Instant Access!
Ask an Expert
Our Experts can answer your tough homework and study questions
154368 Computer Science Questions Answered!
Post a Question